forked from publicsuffix/list
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (46 loc) · 1.66 KB
/
test-alphabetical.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
41
42
43
44
45
46
47
48
49
50
51
52
name: Check Alphabeitical Order
on:
pull_request_target:
paths:
- "public_suffix_list.dat"
permissions:
pull-requests: write
jobs:
Alphabetic-Check:
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.read_results.outputs.contents }}
steps:
- name: Get PR files
uses: actions/checkout@v2
with:
ref: "${{ github.event.pull_request.head.sha }}"
path: "pull-request"
- name: Get base ref
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.base.ref }}
path: base
- name: Content check
run: python3 base/tools/alphabet_script.py pull-request/public_suffix_list.dat > results.txt
- name: Read the result
id: read_results
uses: andstor/file-reader-action@v1
with:
path: "results.txt"
- name: Create Comment
uses: mshick/add-pr-comment@v2
with:
message-path: "results.txt"
refresh-message-position: true
- name: Apply Label
if: steps.read_results.outputs.contents == ''
uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Alphabet Check Success']
})