-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhanced github action to write to a wiki page
- Loading branch information
Showing
3 changed files
with
72 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
name: Translation Stats | ||
|
||
on: push | ||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
comp-stats: | ||
name: Compute translation stats | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 1 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- name: Setup python env | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: run script (t_stats.py) | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: Checkout the wiki | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: "${{ github.repository }}.wiki" | ||
path: .wiki | ||
- name: Run script (t_stats.py) | ||
run: | | ||
python scripts/t_stats.py . -s | tee .wiki/Translation-progress.md | ||
- name: Commit to wiki | ||
working-directory: .wiki | ||
run: | | ||
python scripts/t_stats.py . | ||
git config user.name "[bot] ${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
git add . | ||
if git commit -m "auto-update wiki report (${GITHUB_WORKFLOW})"; then | ||
git push origin master | ||
fi |
This file contains 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
This file contains 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