Update locale-specific data #1450
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 locale-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 |