chore: update deps, apply latest lints (#1612) #5
This file contains hidden or 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: Update Translations | |
| "on": | |
| push: | |
| branches: | |
| - 'main' | |
| paths: | |
| - 'crates/rnote-ui/po/LINGUAS' | |
| - 'crates/rnote-ui/po/zh_Hans.po' | |
| - 'crates/rnote-ui/po/zh_Hant.po' | |
| workflow_dispatch: | |
| workflow_call: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| i18n_zh_Hans2zh_Hant: | |
| name: zh_Hans -> zh_Hant | |
| runs-on: ubuntu-24.04 | |
| container: fedora:42 | |
| permissions: | |
| # needed for pushing the changes | |
| contents: write | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo dnf install -y just lsb_release git opencc-tools | |
| - name: Setup repository | |
| run: | | |
| git clone -b ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} \ | |
| ${{ github.server_url }}/${{ github.repository }} . | |
| git config --global --add safe.directory "$(pwd)" | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| - name: Update translations | |
| run: | | |
| just update-translations | |
| - name: Commit changes | |
| id: commit-changes | |
| run: | | |
| echo -e "i18n: Update traditional Chinese translation\nreferenced issue: #220" \ | |
| | git commit -a -F - || export failure=$? | |
| if [ -z $failure ]; then | |
| echo "status=true" >> $GITHUB_OUTPUT | |
| elif [ $failure = '1' ]; then | |
| echo 'No commit made, skip push.' | |
| echo "status=false" >> $GITHUB_OUTPUT | |
| else | |
| exit $failure | |
| fi | |
| - name: Push changes | |
| if: ${{ steps.commit-changes.outputs.status == 'true' }} | |
| uses: ad-m/github-push-action@v0.8.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: ${{ github.ref }} |