update-mappings-daily-cron-job #1052
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: update-mappings-daily-cron-job | |
on: | |
workflow_dispatch: # run manually | |
schedule: # run daily at 8am | |
- cron: "0 8 * * *" | |
jobs: | |
update-mappings: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }} | |
restore-keys: ${{ runner.os }}-pip- | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip install -U pip setuptools wheel | |
pip install -U tox tox-gh-actions | |
- name: Generate mappings | |
run: tox -e generate-mappings | |
- name: Validate generated mappings | |
run: tox | |
- name: Commit and push mappings | |
run: bash scripts/upload_mappings.sh |