Skip to content

Update local-specific data #958

Update local-specific data

Update local-specific data #958

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@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/cache@v3
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
run: |
python -m scripts
./check.sh || true
- 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 }}