Files
mattermost/.github/workflows/i18n-ci-template.yml
T
Nuno Simões 3af36e0a49 ci: scope GitHub Actions workflows (#36890)
* Scope GitHub Actions workflow and job permissions

* Fix workflow permissions gaps from least-privilege scoping
2026-06-04 19:40:30 +02:00

36 lines
1.1 KiB
YAML

# Base CI template which is called from i18n-ci-pr.yml
name: i18n CI Template
on:
workflow_call:
permissions:
contents: read
jobs:
check-files:
name: Check only English translation files changed
runs-on: ubuntu-22.04
if: github.event.pull_request.user.login != 'weblate' # Allow weblate to modify non-English
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
with:
files: |
server/i18n/*.json
webapp/channels/src/i18n/*.json
!server/i18n/en.json
!webapp/channels/src/i18n/en.json
- name: Check changed files
if: steps.changed-files.outputs.any_changed == 'true'
run: |
echo "::error title=Non-English i18n files changed::Only PRs from weblate should modify non-English translation files."
exit 1