Revert "Remove now unused code from mgr-setup" #2473
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check if translation is required | |
on: | |
pull_request_target: | |
paths: | |
- 'java/code/src/com/redhat/rhn/frontend/strings/**' | |
- 'backend/**' | |
- 'client/rhel/yum-rhn-plugin/**' | |
- 'client/rhel/mgr-daemon/**' | |
- 'client/rhel/spacewalk-client-tools/**' | |
- 'web/**' | |
- 'susemanager/**' | |
- 'spacecmd/**' | |
jobs: | |
run: | |
name: Check by trying to locally update translation files | |
if: github.repository == 'uyuni-project/uyuni' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup tooling | |
run: sudo apt-get install -y make git gettext intltool python3 | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Setup git | |
run: | | |
git config --global user.name "Galaxy CI" | |
git config --global user.email "[email protected]" | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
path: 'master_repo' | |
- name: Update all translations files | |
run: | | |
cd master_repo | |
git switch -c check_translations | |
git branch origin_check_translations | |
ADDITIONAL_SAFE_BRANCHNAME=check_translations scripts/translation/update-all-translation-strings.sh | |
cd .. | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check if there has been changes on translation files for master | |
run: | | |
cd master_repo | |
trs=$(git diff origin_check_translations check_translations | wc -l) | |
echo "Translations needed for master: ${trs}" | |
echo "translations_needed_for_master=${trs}" >> $GITHUB_ENV | |
cd .. | |
- name: Checkout PR repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
path: 'pr_repo' | |
- name: Update all translations files for PR | |
run: | | |
cd pr_repo | |
git switch -c check_translations | |
git branch origin_check_translations | |
ADDITIONAL_SAFE_BRANCHNAME=check_translations scripts/translation/update-all-translation-strings.sh | |
cd .. | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check if there has been changes on translation files | |
run: | | |
cd pr_repo | |
trs=$(git diff origin_check_translations check_translations | wc -l) | |
echo "Translations needed for PR: ${trs}" | |
echo "translations_needed_for_PR=${trs}" >> $GITHUB_ENV | |
cd .. | |
- name: Add label | |
if: env.translations_needed_for_master != env.translations_needed_for_PR | |
uses: andymckay/[email protected] | |
with: | |
add-labels: "needs-translation" | |
repo-token: "${{ secrets.GITHUB_TOKEN }}" | |