Daily update hospitalizations #402
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 hospitalizations | |
on: | |
schedule: | |
- cron: '0 16 * * *' | |
permissions: write-all | |
# contents: read | |
jobs: | |
vacc-fig: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
# - name: run vaccination status | |
# run: | | |
# python code/covid_html.py | |
- name: run hospitalizations | |
run: | | |
python code/covid_logscale.py | |
- name: check news | |
run: | | |
git config --global user.name "actions" | |
git config --global user.email "actions@github" | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "IS_VALID=true" >> $GITHUB_ENV | |
else | |
echo "IS_VALID=false" >> $GITHUB_ENV | |
fi | |
- name: commit files | |
run: | | |
git add -A | |
git commit -m "manual update" | |
if: ${{ env.IS_VALID == 'true' }} | |
- name: push files | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
if: ${{ env.IS_VALID == 'true' }} | |
- name: done | |
run: echo caramba |