only run the workflow in dev branch in main repo

This commit is contained in:
HB9HIL
2024-06-29 20:15:26 +02:00
parent 248ce79e2b
commit 8a677e4b59

View File

@@ -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 }}