forked from thamara/time-to-leave
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.05 KB
/
update-missing-translations.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Update missing translations
on:
push:
branches:
- main
jobs:
missing-translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Write missing translation to file
run: |
python scripts/check_languages.py -output missing.md -report_summary -report_key_mismatch -report_missing_translations
- name: Get comment body
id: get-comment-body
run: |
body=$(cat missing.md)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body
- name: Update comment
uses: peter-evans/create-or-update-comment@v1
with:
# Update the comment in issue 475
# https://github.com/thamara/time-to-leave/issues/475#issuecomment-808787273
comment-id: 808787273
edit-mode: replace
body: ${{ steps.get-comment-body.outputs.body }}
reactions: hooray