Piped/.github/workflows/weblate-merge.yml

23 lines
675 B
YAML
Raw Normal View History

2022-11-10 17:28:44 +00:00
name: Merge Weblate translations
on:
pull_request:
2022-11-10 17:33:40 +00:00
types: [opened, reopened]
2022-11-10 17:28:44 +00:00
jobs:
merge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check if en.json has been updated
run: |
if -n git diff ${{ github.event.pull_request.base.sha }}..${{ github.sha }} src/locales/en.json; then
exit 1
fi
2022-11-10 17:28:44 +00:00
- name: AutoMerge Weblate translations
2022-11-11 21:14:43 +00:00
if: github.event.pull_request.user.login == 'weblate'
2022-11-10 17:39:20 +00:00
run: gh pr merge --auto --delete-branch --merge "$PR_URL"
2022-11-10 17:35:36 +00:00
env:
2022-11-10 17:39:20 +00:00
PR_URL: ${{github.event.pull_request.html_url}}
2022-11-10 17:35:36 +00:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}