Skip to content

Commit

Permalink
Merge pull request #5012 from VladimirSlavik/master-l10n-bump-fixes
Browse files Browse the repository at this point in the history
infra: l10n bump fixes
  • Loading branch information
VladimirSlavik authored Aug 3, 2023
2 parents 574631b + 565773d commit f076f51
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/l10n-po-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,20 @@ jobs:
if: steps.bump_sha.outputs.changed == 'true'
run: |
git commit po/l10n-config.mk -m "Update translations from Weblate for ${{ matrix.branch }}"
branch_name="${{ matrix.branch }}-l10n-update-$(date '+%Y-%M-%d--%H-%M-%S')"
branch_name="l10n-update/${{ matrix.branch }}-$(date '+%Y-%M-%d--%H-%M-%S')"
git checkout -b "$branch_name"
git push origin "$branch_name"
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
- name: Make pull request
if: steps.bump_sha.outputs.changed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.INSTALLKER_TOKEN }}
run: |
# https://cli.github.com/manual/gh_pr_create
gh pr create \
--base ${{ matrix.branch }} \
--head ${{ steps.make_branch.outputs.branch_name }} \
--title 'Update translations from Weblate' \
--body 'Created by Github actions'
--body 'Created by Github actions' \
--label 'sanity check required'
8 changes: 5 additions & 3 deletions .github/workflows/l10n-po-update.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,20 @@ jobs:
if: steps.bump_sha.outputs.changed == 'true'
run: |
git commit po/l10n-config.mk -m "Update translations from Weblate for ${{ matrix.branch }}"
branch_name="${{ matrix.branch }}-l10n-update-$(date '+%Y-%M-%d--%H-%M-%S')"
branch_name="l10n-update/${{ matrix.branch }}-$(date '+%Y-%M-%d--%H-%M-%S')"
git checkout -b "$branch_name"
git push origin "$branch_name"
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT

- name: Make pull request
if: steps.bump_sha.outputs.changed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.INSTALLKER_TOKEN }}
run: |
# https://cli.github.com/manual/gh_pr_create
gh pr create \
--base ${{ matrix.branch }} \
--head ${{ steps.make_branch.outputs.branch_name }} \
--title 'Update translations from Weblate' \
--body 'Created by Github actions'
--body 'Created by Github actions' \
--label 'sanity check required'
9 changes: 9 additions & 0 deletions docs/ci-status.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Anaconda
:alt: Run unit and RPM tests daily
:target: https://github.com/rhinstaller/anaconda/actions/workflows/tests-daily.yml

.. |l10n-po-update| image:: https://github.com/rhinstaller/anaconda/actions/workflows/l10n-po-update.yml/badge.svg
:alt: Update translations
:target: https://github.com/rhinstaller/anaconda/actions/workflows/l10n-po-update.yml

.. |cockpit-lib-update| image:: https://github.com/rhinstaller/anaconda/actions/workflows/cockpit-lib-update.yml/badge.svg
:alt: Updates Cockpit library
:target: https://github.com/rhinstaller/anaconda/actions/workflows/cockpit-lib-update.yml
Expand All @@ -62,6 +66,11 @@ Anaconda
|tests-daily|
Runs unit and RPM tests every day, independent of any changes to code or containers.

|l10n-po-update|
Updates translations weekly, by opening a PR that bumps the pinned hash used to download when building RPMs.

The PR runs the usual tests, where potential failures caused by translation changes are caught.

|cockpit-lib-update|
Updates the COCKPIT_REPO_COMMIT in ui/webui/Makefile.am and opens a pull request.

Expand Down

0 comments on commit f076f51

Please sign in to comment.