@@ -2,10 +2,9 @@ name: Translation and Linting Workflow
22
33on :
44 schedule :
5- - cron : ' 0 * * * *'
5+ - cron : 0 * * * *
66 push :
7- branches :
8- - ' *'
7+ branches : ['*']
98 workflow_dispatch :
109
1110permissions : {}
@@ -20,10 +19,10 @@ jobs:
2019 permissions :
2120 contents : write # commit and push
2221 steps :
23- - uses : styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
22+ - uses : styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
2423 with :
2524 access_token : ${{ secrets.GITHUB_TOKEN }}
26- - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
25+ - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2726 with :
2827 python-version : 3
2928 - name : Install dependencies
3231 pip install requests cogapp polib transifex-python sphinx-intl blurb six
3332 curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
3433 working-directory : /usr/local/bin
35- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3635 with :
3736 ref : ${{ matrix.version }}
3837 fetch-depth : 0
5049 if : ${{ hashFiles('README.md') != '' }}
5150 env :
5251 TX_TOKEN : ${{ secrets.TX_TOKEN }}
53- - name : Update README.en.md
52+ - name : Update README.en.md
5453 run : python -Werror -m cogapp -rP README.en.md
5554 if : ${{ hashFiles('README.en.md') != '' }}
5655 env :
@@ -59,12 +58,14 @@ jobs:
5958 - run : git config --local user.name "GitHub Action's update-translation job"
6059 - name : Check changes significance
6160 run : >
62- ! git diff -I'^"POT-Creation-Date: ' -I'^"Language-Team: ' -I'^# ' -I'^"Last-Translator: ' -I'^"Project-Id-Version: ' --exit-code && echo "SIGNIFICANT_CHANGES=1" >> "$GITHUB_ENV" || exit 0
61+ ! git diff -I'^"POT-Creation-Date: ' -I'^"Language-Team: ' -I'^# ' -I'^"Last-Translator:
62+ ' -I'^"Project-Id-Version: ' --exit-code && echo "SIGNIFICANT_CHANGES=1" >> "$GITHUB_ENV"
63+ || exit 0
6364 - run : git add .
6465 - run : git commit -m "$(python manage_translation.py generate_commit_msg)"
6566 if : env.SIGNIFICANT_CHANGES
6667 - name : Push commit
67- uses : ad-m/github-push-action@881a6320fdb16eb5318c5054f31c218aec2b324c # v1.3.0
68+ uses : ad-m/github-push-action@881a6320fdb16eb5318c5054f31c218aec2b324c # v1.3.0
6869 if : env.SIGNIFICANT_CHANGES
6970 with :
7071 branch : ${{ matrix.version }}
@@ -76,18 +77,18 @@ jobs:
7677 fail-fast : false
7778 matrix :
7879 version : [3.15, 3.14, 3.13, 3.12, 3.11]
79- needs : [' update' ]
80+ needs : [update]
8081 continue-on-error : true
8182 steps :
82- - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
83+ - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
8384 with :
8485 python-version : 3
8586 - run : pip install sphinx-lint
86- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
87+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8788 with :
8889 ref : ${{ matrix.version }}
8990 persist-credentials : false
90- - uses : rffontenelle/sphinx-lint-problem-matcher@4270bf50b2c93640a7cbb231c09f8e694699af9f # v1.0.0
91+ - uses : rffontenelle/sphinx-lint-problem-matcher@4270bf50b2c93640a7cbb231c09f8e694699af9f # v1.0.0
9192 - run : sphinx-lint
9293
9394 build :
@@ -97,19 +98,19 @@ jobs:
9798 matrix :
9899 version : [3.15, 3.14, 3.13, 3.12, 3.11, '3.10']
99100 format : [html, latex, epub]
100- needs : [' update' ]
101+ needs : [update]
101102 steps :
102- - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
103+ - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
103104 with :
104- python-version : 3.12 # pin for Sphinx 3.4.3 in 3.10 branch (see # 63)
105- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
105+ python-version : 3.12 # pin for Sphinx 3.4.3 in 3.10 branch (see # 63)
106+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
106107 with :
107108 repository : python/cpython
108109 ref : ${{ matrix.version }}
109110 persist-credentials : false
110111 - run : make venv
111112 working-directory : ./Doc
112- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
113+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
113114 with :
114115 ref : ${{ matrix.version }}
115116 path : Doc/locales/pl/LC_MESSAGES
@@ -118,10 +119,10 @@ jobs:
118119 working-directory : ./Doc/locales/pl/LC_MESSAGES
119120 - run : sudo apt-get update && sudo apt-get install -y librsvg2-bin
120121 if : ${{ matrix.format == 'latex' && fromJSON(matrix.version) >= 3.14 }}
121- - uses : sphinx-doc/github-problem-matcher@1f74d6599f4a5e89a20d3c99aab4e6a70f7bda0f # v1.1
122+ - uses : sphinx-doc/github-problem-matcher@1f74d6599f4a5e89a20d3c99aab4e6a70f7bda0f # v1.1
122123 - run : make -e SPHINXOPTS="--color -D language='pl' -W --keep-going" ${{ matrix.format }}
123124 working-directory : ./Doc
124- - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
125+ - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
125126 if : success() || failure()
126127 with :
127128 name : build-${{ matrix.version }}-${{ matrix.format }}
@@ -132,15 +133,15 @@ jobs:
132133 strategy :
133134 matrix :
134135 version : [3.15, 3.14, 3.13, 3.12, 3.11, '3.10']
135- needs : [' build' ]
136+ needs : [build]
136137 steps :
137- - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
138+ - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
138139 with :
139140 name : build-${{ matrix.version }}-latex
140141 - run : sudo apt-get update
141142 - run : sudo apt-get install -y latexmk texlive-xetex fonts-freefont-otf xindy
142143 - run : make
143- - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
144+ - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
144145 with :
145146 name : build-${{ matrix.version }}-pdf
146147 path : .
@@ -150,14 +151,14 @@ jobs:
150151 strategy :
151152 matrix :
152153 version : [3.15, 3.14]
153- needs : [' build' ]
154+ needs : [build]
154155 continue-on-error : true
155156 steps :
156- - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
157+ - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
157158 with :
158159 python-version : 3.x
159- - uses : astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
160- - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
160+ - uses : astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
161+ - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
161162 with :
162163 name : build-${{ matrix.version }}-epub
163164 - run : uvx epubcheck
0 commit comments