Skip to content

Commit b5726b4

Browse files
authored
fix(scorecards): Move env variable to individual steps (#713)
Signed-off-by: Javier Rodriguez <[email protected]>
1 parent 8084706 commit b5726b4

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/scorecards.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
id-token: write
2929
contents: read
3030
actions: read
31-
env:
32-
CHAINLOOP_VERSION: 0.83.0
33-
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_ROBOT_ACCOUNT_SCORECARDS }}
3431

3532
steps:
3633
- name: Install Chainloop
3734
run: |
3835
curl -sfL https://raw.githubusercontent.com/chainloop-dev/chainloop/01ad13af08950b7bfbc83569bea207aeb4e1a285/docs/static/install.sh | bash -s -- --version v${{ env.CHAINLOOP_VERSION }}
36+
env:
37+
CHAINLOOP_VERSION: 0.83.0
38+
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_ROBOT_ACCOUNT_SCORECARDS }}
3939

4040
- name: "Checkout code"
4141
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -45,6 +45,8 @@ jobs:
4545
- name: Initialize Attestation
4646
run: |
4747
chainloop attestation init
48+
env:
49+
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_ROBOT_ACCOUNT_SCORECARDS }}
4850

4951
- name: "Run analysis"
5052
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
@@ -69,6 +71,8 @@ jobs:
6971
- name: Add Attestation (Sarif results)
7072
run: |
7173
chainloop attestation add --name sarif-results --value results.sarif
74+
env:
75+
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_ROBOT_ACCOUNT_SCORECARDS }}
7276

7377
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
7478
# format to the repository Actions tab.
@@ -93,13 +97,18 @@ jobs:
9397
env:
9498
CHAINLOOP_SIGNING_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
9599
CHAINLOOP_SIGNING_KEY: ${{ secrets.COSIGN_KEY }}
100+
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_ROBOT_ACCOUNT_SCORECARDS }}
96101

97102
- name: Mark attestation as failed
98103
if: ${{ failure() }}
99104
run: |
100105
chainloop attestation reset
106+
env:
107+
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_ROBOT_ACCOUNT_SCORECARDS }}
101108

102109
- name: Mark attestation as cancelled
103110
if: ${{ cancelled() }}
104111
run: |
105112
chainloop attestation reset --trigger cancellation
113+
env:
114+
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_ROBOT_ACCOUNT_SCORECARDS }}

0 commit comments

Comments
 (0)