-
-
Notifications
You must be signed in to change notification settings - Fork 42
39 lines (35 loc) · 1.25 KB
/
pipeline.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
name: Pipeline
on:
pull_request:
branches:
- '*'
jobs:
check-repertoire-changes:
name: Check repertoire changes
runs-on: ubuntu-latest
steps:
- name: Checkout merged UnicodeData.txt
uses: actions/checkout@v3
with:
path: merged
sparse-checkout: unicodetools/data/ucd/dev/UnicodeData.txt
- name: Checkout base UnicodeData.txt
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.sha }}
path: base
sparse-checkout: unicodetools/data/ucd/dev/UnicodeData.txt
- name: Compare repertoire
id: compare-repertoire
run: |
sed 's/^\([^;]*;[^;]*\);.*$/\1/' merged/unicodetools/data/ucd/dev/UnicodeData.txt > merged-repertoire.txt
sed 's/^\([^;]*;[^;]*\);.*$/\1/' base/unicodetools/data/ucd/dev/UnicodeData.txt > base-repertoire.txt
if diff base-repertoire.txt merged-repertoire.txt
then echo "changed=false" >> "$GITHUB_OUTPUT"
else echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Check pipeline labels
if: steps.compare-repertoire.outputs.changed == 'true'
run: |
cat $GITHUB_EVENT_PATH |
python3 -c "import sys, json; print(json.load(sys.stdin)['pull_request']['labels'])"