@@ -11,6 +11,9 @@ concurrency:
11
11
group : ${{ github.workflow }}-${{ github.ref }}
12
12
cancel-in-progress : ${{ github.event_name == 'pull_request' }}
13
13
14
+ env :
15
+ image_name : template-github-release
16
+
14
17
jobs :
15
18
release :
16
19
name : Create Release
58
61
id : meta
59
62
uses : docker/metadata-action@v4
60
63
with :
61
- images : ghcr.io/kong/template-github-release
64
+ images : ghcr.io/kong/${{ env.image_name }}
62
65
sep-tags : ' '
63
66
flavor : |
64
67
suffix=-${{ matrix.architecture }}-${{ matrix.ostype }}
71
74
if : ${{ needs.release.outputs.published == 'true' }}
72
75
run : |
73
76
for tag in ${{ steps.meta.outputs.tags }}; do \
74
- docker tag ghcr.io/template-github-release :build-$ARCHITECTURE-$OSTYPE $tag && \
77
+ docker tag ghcr.io/${{ env.image_name }} :build-$ARCHITECTURE-$OSTYPE $tag && \
75
78
docker push $tag; \
76
79
done
77
80
- name : Archive the package
84
87
with :
85
88
tag_name : ${{ needs.release.outputs.release-git-tag }}
86
89
files : ${{ matrix.architecture }}-${{ matrix.ostype }}.tar.gz
90
+
91
+ multi-arch :
92
+ needs : artifacts
93
+ name : Create Release Artifacts
94
+ strategy :
95
+ matrix :
96
+ ostype : [linux-gnu, linux-musl]
97
+ runs-on : ubuntu-latest
98
+ steps :
99
+ - name : Combine per architecture images into a single multi-arch manifest
100
+ run : |
101
+ docker pull ghcr.io/kong/${{ env.image_name }}:${{ needs.release.outputs.release-git-tag }}-aarch64-${{ matrix.ostype }}
102
+ docker pull ghcr.io/kong/${{ env.image_name }}:${{ needs.release.outputs.release-git-tag }}-x86_64-${{ matrix.ostype }}
103
+ docker manifest ghcr.io/kong/${{ env.image_name }}:${{ needs.release.outputs.release-git-tag }}-${{ matrix.ostype }} \
104
+ ghcr.io/kong/${{ env.image_name }}:${{ needs.release.outputs.release-git-tag }}-aarch64-${{ matrix.ostype }} \
105
+ ghcr.io/kong/${{ env.image_name }}:${{ needs.release.outputs.release-git-tag }}-x86_64-${{ matrix.ostype }}
106
+ ghcr.io/kong/${{ env.image_name }}:${{ needs.release.outputs.release-git-tag }}-${{ matrix.ostype }}
0 commit comments