ots/.github/workflows/pr-regen-translations.yml
Knut Ahlers 6f59345316
CI: Configure commit author
in order to prevent "untrusted" commits

Signed-off-by: Knut Ahlers <knut@ahlers.me>
2024-11-21 12:49:48 +01:00

45 lines
1004 B
YAML

---
name: pull-request-ci
on:
pull_request_target:
paths: ["i18n.yaml"]
jobs:
generate-translations:
defaults:
run:
shell: bash
container:
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Marking workdir safe
run: git config --global --add safe.directory /__w/ots/ots
- name: Re-Generate embedded translations file
working-directory: ./ci/translate
run: go run .
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_author: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
commit_message: 'CI: Update embedded translations'
file_pattern: 'src/langs/langs.js'
...