chore(deps): Bump league/commonmark from 2.9.0 to 2.10.0 #18
Workflow file for this run
This file contains hidden or 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: Protect translations | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| types: [opened, synchronize, reopened, edited] | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate-lang: | |
| if: ${{ github.event_name == 'pull_request' }} | |
| name: validate-lang | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Validate language-file changes | |
| env: | |
| PR_AUTHOR: ${{ github.event.pull_request.user.login }} | |
| PR_HEAD_REF: ${{ github.head_ref || github.event.pull_request.head.ref }} | |
| PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} | |
| BASE_REF: ${{ github.base_ref || github.event.pull_request.base.ref }} | |
| run: | | |
| set -euo pipefail | |
| if [[ "$PR_AUTHOR" == "weblate" ]]; then | |
| echo "Weblate PR: allowing lang/ changes." | |
| exit 0 | |
| fi | |
| if [[ "$PR_AUTHOR" == "github-actions[bot]" ]] && \ | |
| [[ "$PR_HEAD_REF" == "chore/i18n-refresh-source-strings" ]] && \ | |
| [[ "$PR_HEAD_REPO" == "LibreSign/site" ]]; then | |
| echo "Automation PR: allowing lang/ changes." | |
| exit 0 | |
| fi | |
| if git diff --name-only "origin/${BASE_REF}"...HEAD -- lang | grep -q .; then | |
| echo "Regular PRs must not edit files under lang/." | |
| echo "Allowed exceptions: Weblate PRs and source-string refresh automation." | |
| exit 1 | |
| fi | |
| echo "No lang/ changes detected; validation passed." |