Daily Tweet Update #1191
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Daily Tweet Update | |
on: | |
schedule: | |
- cron: "15 15 * * *" | |
- cron: "15 17 * * *" | |
push: | |
paths: | |
- .github/workflows/update.yml | |
jobs: | |
update: | |
name: Update | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: Run image | |
uses: abatilo/actions-poetry@v2.0.0 | |
with: | |
poetry-version: "1.4.2" | |
- name: Run update | |
run: | | |
poetry install | |
git pull origin main | |
poetry run homicide-bot update | |
env: | |
CONSUMER_KEY: ${{ secrets.CONSUMER_KEY }} | |
CONSUMER_SECRET: ${{ secrets.CONSUMER_SECRET }} | |
ACCESS_KEY: ${{ secrets.ACCESS_KEY }} | |
ACCESS_SECRET: ${{ secrets.ACCESS_SECRET }} | |
- name: Commit files | |
continue-on-error: true | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add homicide_bot/data/ | |
git commit -a -m "Add daily update changes" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |