From 8a677e4b591db3e312118da500eb00673bb9e00e Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Sat, 29 Jun 2024 20:15:26 +0200 Subject: [PATCH] only run the workflow in dev branch in main repo --- .github/workflows/translation.yml | 39 +++++++++++++++++-------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/translation.yml b/.github/workflows/translation.yml index 15da26f2e..5c724f7be 100644 --- a/.github/workflows/translation.yml +++ b/.github/workflows/translation.yml @@ -2,30 +2,33 @@ name: Run the po generator script on: push: + branches: + - dev jobs: build: + if: github.repository == 'wavelog/wavelog' runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - repository: wavelog/wavelog - ref: dev + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: wavelog/wavelog + ref: dev - - name: Set up gettext - run: sudo apt-get install -y gettext + - name: Set up gettext + run: sudo apt-get install -y gettext - - name: Run the po generator script - run: bash po_gen.sh + - name: Run the po generator script + run: bash po_gen.sh - - name: Commit changes - run: | - git config --global user.name "github-actions" - git config --global user.email "github-actions@github.com" - git add . - git commit -m "Run po_gen.sh script to update translation-files" - git push - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Commit changes + run: | + git config --global user.name "github-actions" + git config --global user.email "github-actions@github.com" + git add . + git commit -m "Run po_gen.sh script to update translation files" + git push + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file