-
Notifications
You must be signed in to change notification settings - Fork 213
40 lines (35 loc) · 1.37 KB
/
notice-i18n-tasks.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
37
38
39
40
name: Notice i18n Tasks
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
jobs:
notice-i18n-tasks:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: Check diffs
id: check-diffs
run: |
updated_files="$(.github/workflows/deep-diff.sh website/content/en ${{ github.sha }} ${{ github.event.pull_request.head.sha }})"
echo "${updated_files}" # for debugging
echo "count=$(echo $updated_files | grep -v '^$' | wc -l)" >> $GITHUB_OUTPUT
- name: Send notice on the issue
if: steps.check-diffs.outputs.count > 0
uses: thollander/actions-comment-pull-request@v2
with:
comment_tag: i18n-notice
message: |
### Action Required
You are adding or updating English content so please take the following actions for other languages.
- If you update content, that has corresponding files in other languages, include a note suggesting that users check the English page for the most recent updates in those translated pages.
- If you add new content under `website/content/en` there is nothing you need to do.