File tree 3 files changed +54
-0
lines changed
3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ if [ ! -e dist/artifacts.json ] ; then
5
+ exit 1
6
+ fi
7
+
8
+ echo " Gather the container images generated and published with goreleaser"
9
+ images=$( jq -r ' [.[] | select (.type=="Published Docker Image") | select(.name|endswith("latest")|not)]' dist/artifacts.json)
10
+ image_1=$( echo " $images " | jq -r ' .[0].name' )
11
+ image_2=$( echo " $images " | jq -r ' .[1].name' )
12
+ digest_1=$( echo " $images " | jq -r ' .[0].extra.Digest' )
13
+ digest_2=$( echo " $images " | jq -r ' .[1].extra.Digest' )
14
+
15
+ echo " Export github actions outputs"
16
+ echo " name_1=$image_1 " >> " $GITHUB_OUTPUT "
17
+ echo " name_2=$image_2 " >> " $GITHUB_OUTPUT "
18
+ echo " digest_1=$digest_1 " >> " $GITHUB_OUTPUT "
19
+ echo " digest_2=$digest_2 " >> " $GITHUB_OUTPUT "
Original file line number Diff line number Diff line change @@ -47,11 +47,36 @@ jobs:
47
47
- name : Release
48
48
run : make release
49
49
50
+ # Store artifacts to help with troubleshooting
51
+ - uses : actions/upload-artifact@v4
52
+ if : always()
53
+ with :
54
+ name : release
55
+ path : " dist/*.*"
56
+ retention-days : 5
57
+
50
58
- name : generate build provenance (binaries)
51
59
uses : github-early-access/generate-build-provenance@main
52
60
with :
53
61
subject-path : " ${{ github.workspace }}/dist/*.*"
54
62
63
+ # See https://github.com/github-early-access/generate-build-provenance/issues/162
64
+ - name : container image digest
65
+ id : image
66
+ run : .ci/get-docker-provenance.sh
67
+
68
+ - name : generate build provenance (containers x86_64)
69
+ uses : github-early-access/generate-build-provenance@main
70
+ with :
71
+ subject-name : ${{ steps.image.outputs.name_1 }}
72
+ subject-digest : ${{ steps.image.outputs.digest_1 }}
73
+
74
+ - name : generate build provenance (containers arm64)
75
+ uses : github-early-access/generate-build-provenance@main
76
+ with :
77
+ subject-name : ${{ steps.image.outputs.name_2 }}
78
+ subject-digest : ${{ steps.image.outputs.digest_2 }}
79
+
55
80
- name : GitHub Release
56
81
run : make release-notes
57
82
env :
Original file line number Diff line number Diff line change @@ -72,6 +72,16 @@ dockers:
72
72
- " --label=org.opencontainers.image.revision={{ .FullCommit }}"
73
73
- " --label=org.opencontainers.image.version={{ .Version }}"
74
74
75
+ docker_manifests :
76
+ - name_template : ' {{ .Env.DOCKER_REGISTRY }}/{{ .Env.DOCKER_IMAGE_NAME }}:{{ trimprefix .Tag "v" }}'
77
+ image_templates :
78
+ - ' {{ .Env.DOCKER_REGISTRY }}/{{ .Env.DOCKER_IMAGE_NAME }}-x86_64:{{ trimprefix .Tag "v" }}'
79
+ - ' {{ .Env.DOCKER_REGISTRY }}/{{ .Env.DOCKER_IMAGE_NAME }}-arm64:{{ trimprefix .Tag "v" }}'
80
+ - name_template : ' {{ .Env.DOCKER_REGISTRY }}/{{ .Env.DOCKER_IMAGE_NAME }}:latest'
81
+ image_templates :
82
+ - " {{ .Env.DOCKER_REGISTRY }}/{{ .Env.DOCKER_IMAGE_NAME }}-x86_64:latest"
83
+ - " {{ .Env.DOCKER_REGISTRY }}/{{ .Env.DOCKER_IMAGE_NAME }}-arm64:latest"
84
+
75
85
publishers :
76
86
- name : publish-aws
77
87
cmd : ./.ci/publish-aws.sh
You can’t perform that action at this time.
0 commit comments