@@ -50,12 +50,32 @@ jobs:
50
50
if : ${{ !startsWith(github.repository, env.REPOSITORY) }}
51
51
run : echo "REPOSITORY=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV}
52
52
53
- - name : 🛠️ Set up QEMU
54
- uses : docker/setup-qemu-action@v3
55
-
56
53
- name : 🐳 Set up Docker Buildx
57
54
uses : docker/setup-buildx-action@v3
58
55
56
+ - name : 🐳 Set up Docker metadata
57
+ id : meta
58
+ uses : docker/metadata-action@v5
59
+ with :
60
+ images : ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}
61
+ tags : ${{ inputs.qt_version == '6' && format('{0}-qt6', inputs.codename) || inputs.codename }}
62
+ labels : |
63
+ org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ inputs.distribution }} ${{ inputs.codename }}
64
+ org.opencontainers.image.vendor=Hyperion Project
65
+ org.opencontainers.image.authors=Hyperion Team
66
+ org.opencontainers.image.url=${{ github.server_url }}/${{ env.REPOSITORY }}
67
+ org.opencontainers.image.source=${{ github.server_url }}/${{ env.REPOSITORY }}/hyperion.docker-ci
68
+ org.opencontainers.image.documentation=https://docs.hyperion-project.org
69
+ org.opencontainers.image.licenses=MIT
70
+ annotations : |
71
+ org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ inputs.distribution }} ${{ inputs.codename }}
72
+ org.opencontainers.image.vendor=Hyperion Project
73
+ org.opencontainers.image.authors=Hyperion Team
74
+ org.opencontainers.image.url=${{ github.server_url }}/${{ env.REPOSITORY }}
75
+ org.opencontainers.image.source=${{ github.server_url }}/${{ env.REPOSITORY }}/hyperion.docker-ci
76
+ org.opencontainers.image.documentation=https://docs.hyperion-project.org
77
+ org.opencontainers.image.licenses=MIT
78
+
59
79
- name : 🔑 Login to GitHub Container Registry
60
80
if : ${{ env.SECRET_DOCKER_CI != null }}
61
81
uses : docker/login-action@v3
@@ -64,23 +84,15 @@ jobs:
64
84
username : ${{ github.actor }}
65
85
password : ${{ secrets.DOCKER_CI }}
66
86
67
- - name : 🐳 Set up Docker metadata
68
- id : docker_metadata
69
- uses : docker/metadata-action@v5
70
- with :
71
- images : ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}
72
- tags : type=sha
73
-
74
87
- name : 👷 Build and 🚀 Push digest to GitHub Container/Package Registry
75
- id : docker_build
88
+ id : build
76
89
uses : docker/build-push-action@v6
77
90
with :
78
91
context : .
79
92
file : ${{ matrix.target_platform == 'armv6' && 'debian-armv6' || inputs.distribution == 'fedora' && 'fedora' || 'ubuntu_debian' }}
80
93
platforms : ${{ matrix.target_lookup[format('{0}',matrix.target_platform)] }}
94
+ labels : ${{ steps.meta.outputs.labels }}
81
95
provenance : false
82
- labels : ${{ steps.docker_metadata.outputs.labels }}
83
- annotations : ${{ steps.docker_metadata.outputs.annotations }}
84
96
outputs : type=image,name=ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }},push-by-digest=true,name-canonical=true,push=true
85
97
build-args : |
86
98
DIST=${{ inputs.distribution }}
92
104
- name : ⬇ Export digest
93
105
run : |
94
106
mkdir -p /tmp/digests
95
- digest="${{ steps.docker_build .outputs.digest }}"
107
+ digest="${{ steps.build .outputs.digest }}"
96
108
touch "/tmp/digests/${digest#sha256:}"
97
109
98
110
- name : 📦 Upload digest
@@ -107,8 +119,6 @@ jobs:
107
119
name : 👷 Merge and 🚀 Push
108
120
needs : build_and_push
109
121
runs-on : ubuntu-22.04
110
- env :
111
- TAG : ${{ inputs.qt_version == '6' && format('{0}-qt6', inputs.codename) || inputs.codename }}
112
122
113
123
steps :
114
124
- name : 💾 Download digests
@@ -125,6 +135,29 @@ jobs:
125
135
- name : 🐳 Set up Docker Buildx
126
136
uses : docker/setup-buildx-action@v3
127
137
138
+ - name : 🐳 Set up Docker metadata
139
+ id : meta
140
+ uses : docker/metadata-action@v5
141
+ with :
142
+ images : ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}
143
+ tags : ${{ inputs.qt_version == '6' && format('{0}-qt6', inputs.codename) || inputs.codename }}
144
+ labels : |
145
+ org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ inputs.distribution }} ${{ inputs.codename }}
146
+ org.opencontainers.image.vendor=Hyperion Project
147
+ org.opencontainers.image.authors=Hyperion Team
148
+ org.opencontainers.image.url=${{ github.server_url }}/${{ env.REPOSITORY }}
149
+ org.opencontainers.image.source=${{ github.server_url }}/${{ env.REPOSITORY }}/hyperion.docker-ci
150
+ org.opencontainers.image.documentation=https://docs.hyperion-project.org
151
+ org.opencontainers.image.licenses=MIT
152
+ annotations : |
153
+ org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ inputs.distribution }} ${{ inputs.codename }}
154
+ org.opencontainers.image.vendor=Hyperion Project
155
+ org.opencontainers.image.authors=Hyperion Team
156
+ org.opencontainers.image.url=${{ github.server_url }}/${{ env.REPOSITORY }}
157
+ org.opencontainers.image.source=${{ github.server_url }}/${{ env.REPOSITORY }}/hyperion.docker-ci
158
+ org.opencontainers.image.documentation=https://docs.hyperion-project.org
159
+ org.opencontainers.image.licenses=MIT
160
+
128
161
- name : 🔑 Login to GitHub Container Registry
129
162
if : ${{ env.SECRET_DOCKER_CI != null }}
130
163
uses : docker/login-action@v3
@@ -136,8 +169,9 @@ jobs:
136
169
- name : 📝 Create manifest list and 🚀 Push to GitHub Container/Package Registry
137
170
working-directory : /tmp/digests
138
171
run : |
139
- docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}:${{ env.TAG }} $(printf 'ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}@sha256:%s ' *)
172
+ docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
173
+ $(printf 'ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}@sha256:%s ' *)
140
174
141
175
- name : 👀 Inspect image
142
176
run : |
143
- docker buildx imagetools inspect ghcr.io/ ${{ env.REPOSITORY }}/${{ inputs.distribution }}:${{ env.TAG }}
177
+ docker buildx imagetools inspect ${{ steps.meta.outputs.tags }}
0 commit comments