2024-09-23 15:32:57 -04:00
|
|
|
---
|
|
|
|
|
|
|
|
name: pull-request-ci
|
|
|
|
on:
|
2024-11-21 06:17:59 -05:00
|
|
|
pull_request_target:
|
2024-11-21 06:11:00 -05:00
|
|
|
paths: ["i18n.yaml"]
|
2024-09-23 15:32:57 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
generate-translations:
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
container:
|
|
|
|
image: luzifer/gh-arch-env
|
|
|
|
env:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
GOPATH: /go
|
|
|
|
|
2024-11-21 06:11:00 -05:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
2024-09-23 15:32:57 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-10-28 06:00:58 -04:00
|
|
|
with:
|
2024-11-21 06:17:59 -05:00
|
|
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
2024-11-21 06:11:00 -05:00
|
|
|
ref: ${{ github.head_ref }}
|
2024-09-23 15:32:57 -04:00
|
|
|
|
|
|
|
- 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 .
|
|
|
|
|
2024-11-21 06:11:00 -05:00
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v5
|
2024-09-23 15:32:57 -04:00
|
|
|
with:
|
2024-11-21 06:11:00 -05:00
|
|
|
commit_message: 'CI: Update embedded translations'
|
|
|
|
file_pattern: 'src/langs/langs.js'
|
2024-09-23 15:32:57 -04:00
|
|
|
|
|
|
|
...
|