-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (59 loc) · 1.95 KB
/
debian-check.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
53
54
55
56
57
58
59
60
name: debianCheck
on: pull_request
# pull_request:
# paths-ignore:
# - ".github/workflows/**"
permissions:
pull-requests: write
contents: read
checks: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_JOB: ${{ github.job }}
GITHUB_WORKFLOW_SHA: ${{ github.workflow_sha }}
PULL_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_REF_TYPE: ${{ github.ref_type }}
GITHUB_HEAD_REF: ${{ github.head_ref }}
EXCLUDE_FILES: "js,vue,ts,less,html,go,css,json,txt,doc,jpg,png,svg,py,yml,md"
jobs:
debian-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: '2'
- name: Check Debian Prefix
id: check-debian-prefix
if: steps.checkout.outcome == 'success'
run: |
python3 $GITHUB_WORKSPACE/.github/script/debian-check.py --type pre-check
- name: Check Specical Words
id: check-specical-words
if: steps.checkout.outcome == 'success' && always()
env:
FILTER_KEYS: "getcap,setcap,lshw,dmidecode"
run: |
python3 $GITHUB_WORKSPACE/.github/script/debian-check.py --type keys-check --keys $FILTER_KEYS --log keys.json
- name: Check Env Set Words
id: check-env-set-words
if: steps.checkout.outcome == 'success' && always()
env:
FILTER_KEYS: "export,unset"
run: |
python3 $GITHUB_WORKSPACE/.github/script/debian-check.py --type keys-check --keys $FILTER_KEYS --log env-keys.json
- name: Publish reports
if: always()
uses: actions/upload-artifact@v4
with:
name: my-artifact
path: |
keys.json
env-keys.json
- name: Comment PR
if: always() && hashFiles('comment.txt')
uses: thollander/actions-comment-pull-request@v2
with:
filePath: comment.txt