Skip to content

Commit

Permalink
Merge pull request #23569 from cbjeukendrup/translations/lupdate_no_o…
Browse files Browse the repository at this point in the history
…bsolete

ci_lupdate: Fix `"Clean up obsolete strings"` option
  • Loading branch information
cbjeukendrup authored Jul 10, 2024
2 parents cfa90f5 + d3c2bbd commit 7f76996
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/ci_lupdate.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
name: Update translatable strings

on:
on:
workflow_dispatch:
inputs:
cleanup_obsolete:
description: 'Clean up obsolete strings'
description: "Clean up obsolete strings"
required: true
type: boolean
default: false
schedule:
schedule:
- cron: "0 12 * * Sun"

jobs:
lupdate:
runs-on: ubuntu-latest
if: github.event_name != 'schedule' || github.repository == 'musescore/MuseScore'
if: github.event_name != 'schedule' || github.repository == 'musescore/MuseScore'
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Clone repository
uses: actions/checkout@v4

- name: Configure workflow
run: |
LUPDATE_ARGS=''
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event.inputs.cleanup_obsolete }}" == "on" ]]; then
LUPDATE_ARGS='-no-obsolete'
fi
- name: Configure workflow
run: |
LUPDATE_ARGS=''
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event.inputs.cleanup_obsolete }}" == "true" ]]; then
LUPDATE_ARGS='-no-obsolete'
fi
echo "LUPDATE_ARGS=$LUPDATE_ARGS" >> $GITHUB_ENV
echo "LUPDATE_ARGS: $LUPDATE_ARGS"
echo "LUPDATE_ARGS=$LUPDATE_ARGS" >> $GITHUB_ENV
echo "LUPDATE_ARGS: $LUPDATE_ARGS"
- name: Setup environment
run: |
bash ./buildscripts/ci/translation/qt_install.sh
- name: Setup environment
run: |
bash ./buildscripts/ci/translation/qt_install.sh
- name: Run lupdate
run: |
bash ./buildscripts/ci/translation/run_lupdate.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Run `lupdate` with arguments `${{ env.LUPDATE_ARGS }}`"
branch: "ci_lupdate${{github.ref_name && format('_{0}', github.ref_name) || ''}}"
add-paths: share/locale/*
title: "Update in-repo translation source files"
body: "Run `lupdate` with arguments `${{ env.LUPDATE_ARGS }}`"
labels: strings
reviewers: cbjeukendrup
- name: Run lupdate
run: |
bash ./buildscripts/ci/translation/run_lupdate.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Run `lupdate` with arguments `${{ env.LUPDATE_ARGS }}`"
branch: "ci_lupdate${{github.ref_name && format('_{0}', github.ref_name) || ''}}"
add-paths: share/locale/*
title: "Update in-repo translation source files"
body: "Run `lupdate` with arguments `${{ env.LUPDATE_ARGS }}`"
labels: strings
reviewers: cbjeukendrup

0 comments on commit 7f76996

Please sign in to comment.