2020 runs-on : ubuntu-24.04
2121 steps :
2222 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+ with :
24+ persist-credentials : false
2325
2426 - name : Check if running on main
2527 if : github.ref != 'refs/heads/main'
@@ -30,15 +32,19 @@ jobs:
3032 run : echo "This can only be run on the main branch otherwise releases produced will not be verifiable with cosign" && exit 1
3133
3234 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35+ with :
36+ persist-credentials : false
3337
3438 - name : Check if pinned syft is a release version
3539 run : .github/scripts/check-syft-version-is-release.sh
3640
3741 - name : Check if tag already exists
3842 # note: this will fail if the tag already exists
3943 run : |
40- [[ "${{ github.event.inputs.version }}" == v* ]] || (echo "version '${{ github.event.inputs.version }}' does not have a 'v' prefix" && exit 1)
41- git tag ${{ github.event.inputs.version }}
44+ [[ "$VERSION" == v* ]] || (echo "version '$VERSION' does not have a 'v' prefix" && exit 1)
45+ git tag "$VERSION"
46+ env :
47+ VERSION : ${{ github.event.inputs.version }}
4248
4349 - name : Check static analysis results
4450 uses : fountainhead/action-wait-for-check@5a908a24814494009c4bb27c242ea38c93c593be # v1.2.0
@@ -107,14 +113,22 @@ jobs:
107113
108114 - name : Quality gate
109115 if : steps.static-analysis.outputs.conclusion != 'success' || steps.unit.outputs.conclusion != 'success' || steps.integration.outputs.conclusion != 'success' || steps.quality_tests.outputs.conclusion != 'success' || steps.cli-linux.outputs.conclusion != 'success' || steps.acceptance-linux.outputs.conclusion != 'success' || steps.acceptance-mac.outputs.conclusion != 'success'
116+ env :
117+ STATIC_ANALYSIS_STATUS : ${{ steps.static-analysis.conclusion }}
118+ UNIT_TEST_STATUS : ${{ steps.unit.outputs.conclusion }}
119+ INTEGRATION_TEST_STATUS : ${{ steps.integration.outputs.conclusion }}
120+ QUALITY_TEST_STATUS : ${{ steps.quality_tests.outputs.conclusion }}
121+ ACCEPTANCE_LINUX_STATUS : ${{ steps.acceptance-linux.outputs.conclusion }}
122+ ACCEPTANCE_MAC_STATUS : ${{ steps.acceptance-mac.outputs.conclusion }}
123+ CLI_LINUX_STATUS : ${{ steps.cli-linux.outputs.conclusion }}
110124 run : |
111- echo "Static Analysis Status: ${{ steps.static-analysis.conclusion }} "
112- echo "Unit Test Status: ${{ steps.unit.outputs.conclusion }} "
113- echo "Integration Test Status: ${{ steps.integration.outputs.conclusion }} "
114- echo "Quality Test Status: ${{ steps.quality_tests.outputs.conclusion }} "
115- echo "Acceptance Test (Linux) Status: ${{ steps.acceptance-linux.outputs.conclusion }} "
116- echo "Acceptance Test (Mac) Status: ${{ steps.acceptance-mac.outputs.conclusion }} "
117- echo "CLI Test (Linux) Status: ${{ steps.cli-linux.outputs.conclusion }} "
125+ echo "Static Analysis Status: $STATIC_ANALYSIS_STATUS "
126+ echo "Unit Test Status: $UNIT_TEST_STATUS "
127+ echo "Integration Test Status: $INTEGRATION_TEST_STATUS "
128+ echo "Quality Test Status: $QUALITY_TEST_STATUS "
129+ echo "Acceptance Test (Linux) Status: $ACCEPTANCE_LINUX_STATUS "
130+ echo "Acceptance Test (Mac) Status: $ACCEPTANCE_MAC_STATUS "
131+ echo "CLI Test (Linux) Status: $CLI_LINUX_STATUS "
118132 false
119133
120134 # only release core assets within the "release" job. Any other assets not already under the purview of the
@@ -133,6 +147,7 @@ jobs:
133147 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
134148 with :
135149 fetch-depth : 0
150+ persist-credentials : false
136151
137152 - name : Bootstrap environment
138153 uses : ./.github/actions/bootstrap
@@ -157,9 +172,10 @@ jobs:
157172 run : |
158173 git config user.name "anchoreci"
159174 git config user.email "[email protected] " 160- git tag -a ${{ github.event.inputs.version }} -m "Release ${{ github.event.inputs.version }} "
175+ git tag -a "$VERSION" -m "Release $VERSION "
161176 git push origin --tags
162177 env :
178+ VERSION : ${{ github.event.inputs.version }}
163179 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
164180
165181 - name : Build & publish release artifacts
@@ -197,4 +213,6 @@ jobs:
197213 uses : ./.github/workflows/release-version-file.yaml
198214 with :
199215 version : ${{ github.event.inputs.version }}
200- secrets : inherit
216+ secrets :
217+ TOOLBOX_AWS_ACCESS_KEY_ID : ${{ secrets.TOOLBOX_AWS_ACCESS_KEY_ID }}
218+ TOOLBOX_AWS_SECRET_ACCESS_KEY : ${{ secrets.TOOLBOX_AWS_SECRET_ACCESS_KEY }}
0 commit comments