File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Translation
2+
3+ on :
4+ workflow_run :
5+ workflows :
6+ - Test
7+ branches :
8+ - main
9+ types :
10+ - completed
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Grab the repo src
18+ uses : actions/checkout@v2
19+
20+ - name : Set up Python
21+ uses : actions/setup-python@v2
22+ with :
23+ python-version : 3.9
24+
25+ - name : Install Python tooling
26+ run : python -m pip install --upgrade nox virtualenv
27+
28+ - name : Generate a fresh POT file out of RST documents
29+ run : python -m nox -s translation
30+
31+ - name : Commit the POT file to Git
32+ run : |
33+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
34+ git config --local user.name "github-actions[bot]"
35+ git_hash=$(git rev-parse --short "${GITHUB_SHA}")
36+ git commit -m "Update messages.pot as of version ${git_hash}" locales/messages.pot
37+
38+ - name : Check if any sources have changed since the last update
39+ if : failure()
40+ run : echo "There are no changes to the RST sources since the last update. Nothing to do."
41+
42+ - name : >-
43+ Push the updated POT file back to
44+ ${{ github.repository }}@${{ github.event.repository.default_branch }}
45+ on GitHub
46+ run: |
47+ git push --atomic origin HEAD:${{ github.event.repository.default_branch }}
You can’t perform that action at this time.
0 commit comments