@@ -16,7 +16,7 @@ inputs:
16
16
build_file :
17
17
description : Dockerfile with path, not required for self-contained package/default directory
18
18
sbom :
19
- default : ' true'
19
+ default : " true"
20
20
description : Generate a Software Bill of Materials (SBOM) for the container image. Enabled by default for better security practices.
21
21
keep_versions :
22
22
description : Number of versions to keep; omit to skip
@@ -34,11 +34,10 @@ inputs:
34
34
triggers :
35
35
description : Paths used to trigger a build; e.g. ('./backend/' './frontend/)
36
36
37
-
38
37
# ## Usually a bad idea / not recommended
39
38
build_args :
40
39
description : A list of build-time variables, generally not advisable
41
- value : " BUILDKIT_INLINE_CACHE=1"
40
+ default : " BUILDKIT_INLINE_CACHE=1"
42
41
diff_branch :
43
42
description : Branch to diff against
44
43
default : ${{ github.event.repository.default_branch }}
@@ -64,7 +63,7 @@ inputs:
64
63
65
64
outputs :
66
65
digest :
67
- description : ' Digest of the built image; e.g. sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
66
+ description : " Digest of the built image; e.g. sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
68
67
value : ${{ steps.build_and_push.outputs.digest }}
69
68
70
69
triggered :
88
87
echo "Input 'tag' is deprecated. Please use 'tags' instead."
89
88
exit 1
90
89
fi
91
-
90
+
92
91
# If package matches repo name, use simpler image_path
93
92
if [ "${INPUT_PACKAGE,,}" = "${CONTEXT_REPO,,}" ]; then
94
93
image_path="${{ github.repository }}"
@@ -167,7 +166,7 @@ runs:
167
166
with :
168
167
registry : ghcr.io
169
168
username : ${{ github.actor }}
170
- password : ${{ inputs.token }}
169
+ password : ${{ inputs.token }}
171
170
172
171
- name : Build and push ${{ inputs.package }} Docker image
173
172
id : build_and_push
@@ -195,16 +194,16 @@ runs:
195
194
run : |
196
195
# Generate SBOM in both cyclonedx and spdx formats
197
196
IMAGE="ghcr.io/${{ steps.vars.outputs.image_path }}@${{ steps.build_and_push.outputs.digest }}"
198
-
197
+
199
198
# Create SBOMs directory
200
199
mkdir -p sboms
201
-
200
+
202
201
# Generate CycloneDX SBOM
203
202
syft packages "$IMAGE" -o cyclonedx-json > "sboms/${{ inputs.package }}-cyclonedx.json"
204
-
203
+
205
204
# Generate SPDX SBOM
206
205
syft packages "$IMAGE" -o spdx-json > "sboms/${{ inputs.package }}-spdx.json"
207
-
206
+
208
207
# Upload SBOMs as artifacts
209
208
echo "sbom_cyclonedx=sboms/${{ inputs.package }}-cyclonedx.json" >> $GITHUB_OUTPUT
210
209
echo "sbom_spdx=sboms/${{ inputs.package }}-spdx.json" >> $GITHUB_OUTPUT
@@ -225,7 +224,7 @@ runs:
225
224
with :
226
225
subject-name : ghcr.io/${{ github.event.repository.name }}/${{ inputs.package }}
227
226
subject-digest : ${{ steps.build_and_push.outputs.digest }}
228
- predicate-type : ' https://in-toto.io/attestation/release/v0.1'
227
+ predicate-type : " https://in-toto.io/attestation/release/v0.1"
229
228
predicate : ' {"purl":"pkg:oci/${{ github.event.repository.name }}/${{ inputs.package }}"}'
230
229
231
230
- name : Prompt user to fix permissions
0 commit comments