76
76
77
77
GoReleaser :
78
78
runs-on : " shipfox-4vcpu-ubuntu-2404"
79
+ permissions :
80
+ id-token : write
81
+ attestations : write
79
82
if : contains(github.event.pull_request.labels.*.name, 'build-images') || github.ref == 'refs/heads/main' || github.event_name == 'merge_group'
80
83
steps :
81
84
- name : Set up QEMU
@@ -112,6 +115,40 @@ jobs:
112
115
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
113
116
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
114
117
118
+ - uses : actions/upload-artifact@v4
119
+ with :
120
+ name : goreleaser-metadata
121
+ path : |
122
+ dist/*.json
123
+ dist/ledger_checksums.txt
124
+ retention-days : 7
125
+ compression-level : 0
126
+
127
+ # TODO(@sylr): Move this to the Release workflow when proven working.
128
+ # Generate attestations for the goreleaser output archives
129
+ - uses : actions/attest-build-provenance@v2
130
+ with :
131
+ subject-checksums : ./dist/ledger_checksums.txt
132
+ # Generate attestations for the goreleaser output binaries
133
+ - uses : actions/attest-build-provenance@v2
134
+ with :
135
+ subject-path : ./dist/*/**
136
+ # Extract image metadata from the artifacts.json file
137
+ - run : |
138
+ jq -r '[ .[]|select(.type=="Docker Manifest") | .extra.Digest ] | to_entries | .[] | ( "digest"+ (.key | tostring) + "=" + .value )' < dist/artifacts.json >> "$GITHUB_OUTPUT"
139
+ jq -r '[ .[]|select(.type=="Docker Manifest") | .name | split(":")[0] ] | to_entries | .[] | ( "name"+ (.key | tostring) + "=" + .value )' < dist/artifacts.json >> "$GITHUB_OUTPUT"
140
+ id: image_metadata
141
+ # Generate attestations for docker images
142
+ - uses : actions/attest-build-provenance@v2
143
+ with :
144
+ subject-digest : ${{ steps.image_metadata.outputs.digest0 }}
145
+ subject-name : ${{ steps.image_metadata.outputs.name0 }}
146
+ push-to-registry : true
147
+ - uses : actions/attest-build-provenance@v2
148
+ with :
149
+ subject-digest : ${{ steps.image_metadata.outputs.digest1 }}
150
+ subject-name : ${{ steps.image_metadata.outputs.name1 }}
151
+ push-to-registry : true
115
152
116
153
Deploy :
117
154
runs-on : " shipfox-2vcpu-ubuntu-2404"
@@ -145,4 +182,4 @@ jobs:
145
182
--secret AUTH_TOKEN=$ARGOCD_REGION_AUTH_TOKEN
146
183
+deploy-staging
147
184
--TAG=$TAG
148
- --COMPONENT=$COMPONENT
185
+ --COMPONENT=$COMPONENT
0 commit comments