Skip to content

Commit

Permalink
switching from an expression to a nodejs implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlovelltroy committed Jan 17, 2024
1 parent ccc2dfa commit c694164
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,18 @@ jobs:
version: latest
args: release --clean
id: goreleaser
- name: Process goreleaser output
id: process_goreleaser_output
run: |
echo "const artifacts = ${{ fromJson(steps.goreleaser.outputs.artifacts) }}" > process.js
echo "const firstNonNullDigest = artifacts.find(artifact => artifact.extra && artifacts.extra.Digest != null)?.extra.Digest;" >> process.js
echo "console.log(firstNonNullDigest);" >> process.js
echo "fs.writeFileSync('digest.txt', firstNonNullDigest);" >> process.js
node process.js
echo "::set-output name=digest::$(cat digest.txt)"
- name: generate build provenance
uses: github-early-access/generate-build-provenance@main
with:
subject-name: ghcr.io/openchami/ochami-init
subject-digest: ${{ fromJson(steps.goreleaser.outputs.artifacts).find(artifact => artifact.extra.Digest != null).extra.Digest }}
subject-digest: ${{ steps.process_goreleaser_output.outputs.digest }}
push-to-registry: true

0 comments on commit c694164

Please sign in to comment.