Skip to content

Commit a0a522d

Browse files
committed
Revert 'feat(github): Use regular CLI steps in scorecards workflow (#1723)'
Signed-off-by: Javier Rodriguez <[email protected]>
1 parent bf99764 commit a0a522d

File tree

1 file changed

+21
-38
lines changed

1 file changed

+21
-38
lines changed

.github/workflows/scorecards.yml

+21-38
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,20 @@ on:
1818
permissions: read-all
1919

2020
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+
2130
analysis:
2231
name: Scorecard analysis
2332
runs-on: ubuntu-latest
33+
needs:
34+
- chainloop_init
2435
permissions:
2536
# Needed to upload the results to code-scanning dashboard.
2637
security-events: write
@@ -30,23 +41,11 @@ jobs:
3041
actions: read
3142

3243
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-
3744
- name: "Checkout code"
3845
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3946
with:
4047
persist-credentials: false
4148

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-
5049
- name: "Run analysis"
5150
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
5251
with:
@@ -84,29 +83,13 @@ jobs:
8483
with:
8584
sarif_file: results.sarif
8685

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

Comments
 (0)