File tree 4 files changed +73
-0
lines changed
4 files changed +73
-0
lines changed Original file line number Diff line number Diff line change 34
34
with :
35
35
toolchain : nightly
36
36
rustflags : -Zallow-features=
37
+ vet-status :
38
+ uses : ./.github/workflows/vet-status.yml
37
39
38
40
create-issue :
39
41
name : create issue
48
50
- updates-nightly
49
51
- minimal-versions
50
52
- minimal-versions-nightly
53
+ - vet-status
51
54
steps :
52
55
- uses : actions/checkout@v4
53
56
with :
73
76
- updates-nightly
74
77
- minimal-versions
75
78
- minimal-versions-nightly
79
+ - vet-status
76
80
steps :
77
81
- uses : lee-dohm/close-matching-issues@v2
78
82
with :
Original file line number Diff line number Diff line change
1
+ jobs :
2
+ vet-status :
3
+ name : cargo vet status
4
+ runs-on : ubuntu-latest
5
+ steps :
6
+ - uses : actions/checkout@v4
7
+ - uses : actions/checkout@v4
8
+ if : hashFiles('supply-chain/config.toml') != ''
9
+ with :
10
+ repository : ' Nullus157/.github'
11
+ path : nullus.github
12
+ - uses : taiki-e/install-action@v2
13
+ if : hashFiles('supply-chain/config.toml') != ''
14
+ with :
15
+ tool : cargo-vet
16
+ - uses : taiki-e/cache-cargo-install-action@v1
17
+ if : hashFiles('supply-chain/config.toml') != ''
18
+ with :
19
+ tool : toml2json
20
+ - id : vet_status
21
+ uses : mathiasvr/command-output@v2.0.0
22
+ if : hashFiles('supply-chain/config.toml') != ''
23
+ with :
24
+ run : ./nullus.github/vet-status
25
+ - uses : JasonEtco/create-an-issue@v2
26
+ if : hashFiles('supply-chain/config.toml') != ''
27
+ env :
28
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29
+ VET_STATUS : ${{ steps.vet_status.outputs.stdout }}
30
+ with :
31
+ update_existing : true
32
+ filename : nullus.github/vet-status.md
33
+
34
+ on :
35
+ workflow_call :
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ tq () {
4
+ toml2json " supply-chain/$1 " | jq -r " $2 | keys | .[]"
5
+ }
6
+
7
+ local=($( tq audits.toml ' .audits' ) )
8
+ remote=($( tq imports.lock ' .audits["first-party"].audits' ) )
9
+ audited=($( (echo ${local[@]} ; echo ${remote[@]} ) | sort -u) )
10
+ imported=($( tq imports.lock ' .audits | del(."first-party") | .[].audits' | sort -u) )
11
+ trusted=($( tq audits.toml ' .trusted' ) )
12
+ exempted=($( tq config.toml ' .exemptions' ) )
13
+
14
+ log () {
15
+ title=$1
16
+ shift
17
+ echo
18
+ echo " <details><summary>$title : $# </summary>"
19
+ echo
20
+ printf ' * %s\n' " $@ "
21
+ echo
22
+ echo " </details>"
23
+ }
24
+
25
+ log Audited " ${audited[@]} "
26
+ log Imported " ${imported[@]} "
27
+ log Trusted " ${trusted[@]} "
28
+ log Exempted " ${exempted[@]} "
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : " `cargo vet` status"
3
+ labels : supply-chain/status
4
+ ---
5
+
6
+ {{ env.VET_STATUS }}
You can’t perform that action at this time.
0 commit comments