Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[i18n] Create PR only if translation (.po) files were updated #1888

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- 'stable-4.5'
- 'stable-4.6'
- 'stable-4.7'
- 'stable-4.8'

steps:
- uses: actions/checkout@v3
Expand All @@ -45,6 +46,17 @@ jobs:
cd galaxy_ng
django-admin makemessages --all

- name: Check if files were updated
run: |
filesChanged=$(git diff --ignore-matching-lines=POT-Creation-Date)
if [ -z "$filesChanged" ]
then
echo "openPR=false" >> $GITHUB_ENV
else
echo "openPR=true" >> $GITHUB_ENV
fi
shell: bash

- name: Clear fuzzy entries
run: bash .github/workflows/scripts/clear_fuzzy_entries.sh

Expand All @@ -56,7 +68,8 @@ jobs:
- name: Set current date as env variable
run: echo "NOW=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: Create Pull Request
- name: Create a Pull Request (only if files were updated)
if: env.openPR == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading