Skip to content

Update local-specific data #280

Update local-specific data

Update local-specific data #280

name: Update local-specific data
on:
schedule:
# At 00:00 (UTC) every day
- cron: "0 0 * * *"
# Allow to call the workflow manually
workflow_dispatch:
jobs:
auto-update-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'requirements-tests.txt') }}
- name: Install requirements
if: steps.cache.outputs.cache-hit != 'true'
run: python -m pip install -r requirements-tests.txt
- name: 📍 Update data
id: update-data
run: |
python -m scripts
./check.sh
- name: Push changes
uses: Automattic/action-commit-to-branch@master
with:
branch: master
commit_message: "Update locale-specific data"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fail on error
if: steps.update-data.outputs.errors != '0'
run: exit 1