Daily Update Check #996
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 Update Check | |
on: | |
schedule: | |
- cron: "22 00 * * *" | |
workflow_dispatch: {} | |
push: | |
paths: | |
- .github/workflows/daily-update-check.yml | |
jobs: | |
daily-update-check: | |
name: Daily Update Check | |
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.10" | |
- name: Run image | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: "1.2.2" | |
- name: Download files | |
run: | | |
poetry install | |
git pull origin main | |
poetry run phl-budget-data update city | |
poetry run phl-budget-data update school | |
poetry run phl-budget-data save | |
- name: Commit files | |
continue-on-error: true | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -f src/phl_budget_data/data/ | |
git commit -a -m "Add monthly update files" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |