Skip to content

Commit 8ac20c1

Browse files
committed
Add translation.yml
1 parent c3b6c46 commit 8ac20c1

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/translation.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Translation
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 0 ? * WED,SUN *'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.9
18+
19+
- name: Install Dependencies
20+
run: python -m pip install --upgrade nox virtualenv
21+
22+
- name: Create local changes
23+
run: python -m nox -s translation
24+
25+
- name: Commit files
26+
run: |
27+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
28+
git config --local user.name "github-actions[bot]"
29+
git_hash=$(git rev-parse --short "$GITHUB_SHA")
30+
git commit -m "Update messages.pot ${git_hash}" locales/messages.pot
31+
if: ${{job.status == 'failure'}}
32+
run: echo "No Changes!"
33+
34+
- name: Push changes
35+
run: |
36+
git push --atomic main

0 commit comments

Comments
 (0)