ots/.github/workflows/pr-regen-translations.yml

44 lines
901 B
YAML
Raw Normal View History

---
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_message: 'CI: Update embedded translations'
file_pattern: 'src/langs/langs.js'
...