Skip to content

Commit 5ef8616

Browse files
authored
fix: cleanup (#108)
1 parent ffd0310 commit 5ef8616

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

action.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ inputs:
1616
build_file:
1717
description: Dockerfile with path, not required for self-contained package/default directory
1818
sbom:
19-
default: 'true'
19+
default: "true"
2020
description: Generate a Software Bill of Materials (SBOM) for the container image. Enabled by default for better security practices.
2121
keep_versions:
2222
description: Number of versions to keep; omit to skip
@@ -34,11 +34,10 @@ inputs:
3434
triggers:
3535
description: Paths used to trigger a build; e.g. ('./backend/' './frontend/)
3636

37-
3837
### Usually a bad idea / not recommended
3938
build_args:
4039
description: A list of build-time variables, generally not advisable
41-
value: "BUILDKIT_INLINE_CACHE=1"
40+
default: "BUILDKIT_INLINE_CACHE=1"
4241
diff_branch:
4342
description: Branch to diff against
4443
default: ${{ github.event.repository.default_branch }}
@@ -64,7 +63,7 @@ inputs:
6463
6564
outputs:
6665
digest:
67-
description: 'Digest of the built image; e.g. sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
66+
description: "Digest of the built image; e.g. sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
6867
value: ${{ steps.build_and_push.outputs.digest }}
6968

7069
triggered:
@@ -88,7 +87,7 @@ runs:
8887
echo "Input 'tag' is deprecated. Please use 'tags' instead."
8988
exit 1
9089
fi
91-
90+
9291
# If package matches repo name, use simpler image_path
9392
if [ "${INPUT_PACKAGE,,}" = "${CONTEXT_REPO,,}" ]; then
9493
image_path="${{ github.repository }}"
@@ -167,7 +166,7 @@ runs:
167166
with:
168167
registry: ghcr.io
169168
username: ${{ github.actor }}
170-
password: ${{ inputs.token }}
169+
password: ${{ inputs.token }}
171170

172171
- name: Build and push ${{ inputs.package }} Docker image
173172
id: build_and_push
@@ -195,16 +194,16 @@ runs:
195194
run: |
196195
# Generate SBOM in both cyclonedx and spdx formats
197196
IMAGE="ghcr.io/${{ steps.vars.outputs.image_path }}@${{ steps.build_and_push.outputs.digest }}"
198-
197+
199198
# Create SBOMs directory
200199
mkdir -p sboms
201-
200+
202201
# Generate CycloneDX SBOM
203202
syft packages "$IMAGE" -o cyclonedx-json > "sboms/${{ inputs.package }}-cyclonedx.json"
204-
203+
205204
# Generate SPDX SBOM
206205
syft packages "$IMAGE" -o spdx-json > "sboms/${{ inputs.package }}-spdx.json"
207-
206+
208207
# Upload SBOMs as artifacts
209208
echo "sbom_cyclonedx=sboms/${{ inputs.package }}-cyclonedx.json" >> $GITHUB_OUTPUT
210209
echo "sbom_spdx=sboms/${{ inputs.package }}-spdx.json" >> $GITHUB_OUTPUT
@@ -225,7 +224,7 @@ runs:
225224
with:
226225
subject-name: ghcr.io/${{ github.event.repository.name }}/${{ inputs.package }}
227226
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"
229228
predicate: '{"purl":"pkg:oci/${{ github.event.repository.name }}/${{ inputs.package }}"}'
230229

231230
- name: Prompt user to fix permissions

0 commit comments

Comments
 (0)