Skip to content

Split workflow in two #1

Split workflow in two

Split workflow in two #1

Workflow file for this run

name: Import translations from Weblate

Check failure on line 1 in .github/workflows/push-changes.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/push-changes.yml

Invalid workflow file

Workflow 'Import translations from Weblate' cannot listen to itself.
on:
workflow_run:
workflows: [Import translations from Weblate]
types: [completed]
jobs:
import:
runs-on: ubuntu-20.04
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
permissions:
contents: write
steps:
- name: Download the patch artifact
uses: actions/download-artifact@v4
with:
name: sync-translations.patch
run-id: ${{ github.event.workflow_run.id }}
- name: Checkout the PR source branch
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add weblate ${{ github.event.pull_request.head.repo.clone_url }}
git fetch weblate
git checkout ${{ github.event.pull_request.head.ref }}
- name: Apply the patch
run: git apply sync-translations.patch
- name: Commit and push changes
run: |
git add .
git commit -m "Import translations from Weblate"
git push