18
18
permissions : read-all
19
19
20
20
jobs :
21
+ chainloop_init :
22
+ name : Chainloop Init
23
+ uses : chainloop-dev/labs/.github/workflows/chainloop_init.yml@64839eb68c20fefda46929c6c6e893cdf0537619
24
+ secrets :
25
+ api_token : ${{ secrets.CHAINLOOP_TOKEN }}
26
+ with :
27
+ workflow_name : " chainloop-vault-scorecards"
28
+ project_name : " chainloop"
29
+
21
30
analysis :
22
31
name : Scorecard analysis
23
32
runs-on : ubuntu-latest
33
+ needs :
34
+ - chainloop_init
24
35
permissions :
25
36
# Needed to upload the results to code-scanning dashboard.
26
37
security-events : write
@@ -30,23 +41,11 @@ jobs:
30
41
actions : read
31
42
32
43
steps :
33
- - name : Install Chainloop
34
- run : |
35
- curl -sfL https://raw.githubusercontent.com/chainloop-dev/chainloop/01ad13af08950b7bfbc83569bea207aeb4e1a285/docs/static/install.sh | bash -s
36
-
37
44
- name : " Checkout code"
38
45
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
39
46
with :
40
47
persist-credentials : false
41
48
42
- - name : Initialize Attestation
43
- run : |
44
- chainloop attestation init --workflow $CHAINLOOP_WORKFLOW_NAME --project $CHAINLOOP_PROJECT
45
- env :
46
- CHAINLOOP_WORKFLOW_NAME : " chainloop-vault-scorecards"
47
- CHAINLOOP_PROJECT : " chainloop"
48
- CHAINLOOP_TOKEN : ${{ secrets.CHAINLOOP_TOKEN }}
49
-
50
49
- name : " Run analysis"
51
50
uses : ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
52
51
with :
@@ -84,29 +83,13 @@ jobs:
84
83
with :
85
84
sarif_file : results.sarif
86
85
87
- - name : Attest analysis
88
- run : |
89
- chainloop attestation add --name sarif-results --value results.sarif
90
- env :
91
- CHAINLOOP_TOKEN : ${{ secrets.CHAINLOOP_TOKEN }}
92
-
93
- - name : Finish and Record Attestation
94
- if : ${{ success() }}
95
- run : |
96
- chainloop attestation push
97
- env :
98
- CHAINLOOP_TOKEN : ${{ secrets.CHAINLOOP_TOKEN }}
99
-
100
- - name : Mark attestation as failed
101
- if : ${{ failure() }}
102
- run : |
103
- chainloop attestation reset
104
- env :
105
- CHAINLOOP_TOKEN : ${{ secrets.CHAINLOOP_TOKEN }}
106
-
107
- - name : Mark attestation as cancelled
108
- if : ${{ cancelled() }}
109
- run : |
110
- chainloop attestation reset --trigger cancellation
111
- env :
112
- CHAINLOOP_TOKEN : ${{ secrets.CHAINLOOP_TOKEN }}
86
+ chainloop_push :
87
+ name : Chainloop Push
88
+ uses : chainloop-dev/labs/.github/workflows/chainloop_push.yml@25c77318e739c60e86d3dfe7e864f51c665972dd
89
+ needs :
90
+ - analysis
91
+ secrets :
92
+ api_token : ${{ secrets.CHAINLOOP_TOKEN }}
93
+ with :
94
+ attestation_name : " scorecards"
95
+ workflow_name : " chainloop-vault-scorecards"
0 commit comments