Skip to content

Commit 5b64dc7

Browse files
samuelho-devclaude
andcommitted
fix: use actions/upload-artifact for SBOM instead of built-in
The anchore/sbom-action built-in artifact upload doesn't work properly in reusable workflows. Use explicit actions/upload-artifact instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 232ef96 commit 5b64dc7

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/docker-build-push.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,17 @@ jobs:
201201
image: ${{ inputs.registry }}/${{ github.repository_owner }}/${{ inputs.image }}@${{ steps.build.outputs.digest }}
202202
format: 'spdx-json'
203203
output-file: 'sbom.spdx.json'
204-
artifact-name: sbom-${{ inputs.image }}
205-
upload-artifact: true
204+
upload-artifact: false # Disabled: reusable workflow artifact upload has issues
206205
upload-release-assets: false
207206

207+
- name: Upload SBOM as artifact
208+
if: inputs.sbom
209+
uses: actions/upload-artifact@v4
210+
with:
211+
name: sbom-${{ inputs.image }}
212+
path: sbom.spdx.json
213+
retention-days: 30
214+
208215
- name: Install Cosign
209216
if: inputs.sign
210217
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0

0 commit comments

Comments
 (0)