name: Release mature locales (Weblate) updater on: workflow_dispatch: schedule: # 05:00 UTC on the 1st of each month - cron: "0 5 1 * *" env: python_version: '3.14' permissions: contents: read jobs: update: name: Sync release locale list with Weblate runs-on: ubuntu-24.04 environment: name: release steps: - name: Harden Runner uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 with: disable-sudo: true egress-policy: block allowed-endpoints: > files.pythonhosted.org:443 pypi.org:443 github.com:443 api.github.com:443 *.githubusercontent.com:443 hosted.weblate.org:443 ghcr.io - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: main persist-credentials: false - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ env.python_version }} - name: Use Python Dependency Cache uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: ~/.cache/pip key: ${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-release-locale-updater - name: Install Poetry run: python${{ env.python_version }} -m pip install --constraint=.github/github-requirements.txt poetry - name: Configure Poetry run: poetry config virtualenvs.in-project true - name: Install poethepoet run: poetry install --no-interaction --no-root --only automation - name: Regenerate po/release_mature_locales.json run: poetry run poe release-mature-locales-update - name: Create GitHub App Token uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 id: generate-token with: client-id: ${{ secrets.GAPHOR_UPDATER_APP_ID }} private-key: ${{ secrets.GAPHOR_UPDATER_APP_PRIVATE_KEY }} - name: Create Pull Request uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: token: ${{ steps.generate-token.outputs.token }} commit-message: Update Weblate mature release locale list branch: weblate-mature-locales-update delete-branch: true title: "Update Weblate mature release locale list" body: | This PR was automatically created to make the following update: - Refresh `po/release_mature_locales.json` from Hosted Weblate labels: | skip-changelog # Only open a PR if po/release_mature_locales.json changed; otherwise this step # exits successfully without a PR. add-paths: | po/release_mature_locales.json