From e9371c90a07d23ecc3636afda091080fdc1b9a6f Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 23 Sep 2024 21:32:57 +0200 Subject: [PATCH] CI: Add automated regeneration of translations (#195) --- .github/workflows/pr-regen-translations.yml | 39 +++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/pr-regen-translations.yml diff --git a/.github/workflows/pr-regen-translations.yml b/.github/workflows/pr-regen-translations.yml new file mode 100644 index 0000000..80d75cf --- /dev/null +++ b/.github/workflows/pr-regen-translations.yml @@ -0,0 +1,39 @@ +--- + +name: pull-request-ci +on: + pull_request: + +jobs: + generate-translations: + defaults: + run: + shell: bash + + container: + image: luzifer/gh-arch-env + env: + CGO_ENABLED: 0 + GOPATH: /go + + runs-on: ubuntu-latest + + permissions: + # required to push a commit + contents: write + + steps: + - uses: actions/checkout@v4 + + - 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: int128/update-generated-files-action@v2 + with: + commit-message: 'CI: Update embedded translations' + +...