Skip to content

Update data

Update data #44

Workflow file for this run

name: Update data
on:
workflow_dispatch: {}
schedule:
# Run Mondays at 2:15 am
- cron: "15 2 * * 0"
jobs:
update:
permissions: write-all
name: update
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# update stats
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- run: pip install -r requirements.txt
- run: ./update.sh
env:
GITHUB_TOKEN: ${{ secrets.METRICS_GITHUB_TOKEN }}
AUGUR_HOST: ${{ vars.AUGUR_HOST }}
- run: |
git config user.name 'GitHub Actions'
git config user.email '[email protected]'
git add -A
timestamp=$(date -u)
git commit -m "update data: ${timestamp}" || exit 0
- name: Push to ${{ github.ref_name }}
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.METRICS_GITHUB_TOKEN }}
branch: ${{ github.ref_name }}