Skip to content

Commit 52a34db

Browse files
update
1 parent e07f867 commit 52a34db

File tree

4 files changed

+62
-51
lines changed

4 files changed

+62
-51
lines changed

.github/workflows/qt5_6.yml

+52-18
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,32 @@ jobs:
5050
if: ${{ !startsWith(github.repository, env.REPOSITORY) }}
5151
run: echo "REPOSITORY=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV}
5252

53-
- name: 🛠️ Set up QEMU
54-
uses: docker/setup-qemu-action@v3
55-
5653
- name: 🐳 Set up Docker Buildx
5754
uses: docker/setup-buildx-action@v3
5855

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+
5979
- name: 🔑 Login to GitHub Container Registry
6080
if: ${{ env.SECRET_DOCKER_CI != null }}
6181
uses: docker/login-action@v3
@@ -64,23 +84,15 @@ jobs:
6484
username: ${{ github.actor }}
6585
password: ${{ secrets.DOCKER_CI }}
6686

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-
7487
- name: 👷 Build and 🚀 Push digest to GitHub Container/Package Registry
75-
id: docker_build
88+
id: build
7689
uses: docker/build-push-action@v6
7790
with:
7891
context: .
7992
file: ${{ matrix.target_platform == 'armv6' && 'debian-armv6' || inputs.distribution == 'fedora' && 'fedora' || 'ubuntu_debian' }}
8093
platforms: ${{ matrix.target_lookup[format('{0}',matrix.target_platform)] }}
94+
labels: ${{ steps.meta.outputs.labels }}
8195
provenance: false
82-
labels: ${{ steps.docker_metadata.outputs.labels }}
83-
annotations: ${{ steps.docker_metadata.outputs.annotations }}
8496
outputs: type=image,name=ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }},push-by-digest=true,name-canonical=true,push=true
8597
build-args: |
8698
DIST=${{ inputs.distribution }}
@@ -92,7 +104,7 @@ jobs:
92104
- name: ⬇ Export digest
93105
run: |
94106
mkdir -p /tmp/digests
95-
digest="${{ steps.docker_build.outputs.digest }}"
107+
digest="${{ steps.build.outputs.digest }}"
96108
touch "/tmp/digests/${digest#sha256:}"
97109
98110
- name: 📦 Upload digest
@@ -107,8 +119,6 @@ jobs:
107119
name: 👷 Merge and 🚀 Push
108120
needs: build_and_push
109121
runs-on: ubuntu-22.04
110-
env:
111-
TAG: ${{ inputs.qt_version == '6' && format('{0}-qt6', inputs.codename) || inputs.codename }}
112122

113123
steps:
114124
- name: 💾 Download digests
@@ -125,6 +135,29 @@ jobs:
125135
- name: 🐳 Set up Docker Buildx
126136
uses: docker/setup-buildx-action@v3
127137

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+
128161
- name: 🔑 Login to GitHub Container Registry
129162
if: ${{ env.SECRET_DOCKER_CI != null }}
130163
uses: docker/login-action@v3
@@ -136,8 +169,9 @@ jobs:
136169
- name: 📝 Create manifest list and 🚀 Push to GitHub Container/Package Registry
137170
working-directory: /tmp/digests
138171
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 ' *)
140174
141175
- name: 👀 Inspect image
142176
run: |
143-
docker buildx imagetools inspect ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}:${{ env.TAG }}
177+
docker buildx imagetools inspect ${{ steps.meta.outputs.tags }}

debian-armv6

+4-11
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,11 @@ ARG SUITE
99
ARG QT_VERSION
1010
ARG REPOSITORY
1111
ARG CMAKE_VERSION
12+
ARG DEBIAN_FRONTEND=noninteractive
1213
ARG TARGETPLATFORM
1314

14-
LABEL maintainer="Hyperion Project <[email protected]>" \
15-
org.opencontainers.image.title="Debian ${SUITE} ${TARGETPLATFORM} - QT ${QT_VERSION}" \
16-
org.opencontainers.image.description="Compilation environment to build Hyperion for Debian ${SUITE}" \
17-
org.opencontainers.image.url="${REPOSITORY}" \
18-
org.opencontainers.image.source="${REPOSITORY}/hyperion.docker-ci" \
19-
org.opencontainers.image.vendor="Hyperion Project" \
20-
org.opencontainers.image.documentation="https://docs.hyperion-project.org" \
21-
org.opencontainers.image.licenses="MIT"
22-
23-
ARG DEBIAN_FRONTEND=noninteractive
15+
ENV QEMU_EXECVE=1
16+
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/arm/v6}
2417

2518
# update
2619
RUN apt-get update
@@ -80,4 +73,4 @@ RUN curl -kL https://github.com/balena-io/qemu/releases/download/v7.0.0%2Bbalena
8073
RUN chmod +x /usr/bin/qemu-static
8174

8275
# set entrypoint
83-
ENTRYPOINT [ "/usr/bin/qemu-static", "/usr/bin/env", "QEMU_EXECVE=1" ]
76+
ENTRYPOINT [ "/usr/bin/qemu-static" ]

fedora

+2-10
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,7 @@ ARG REPOSITORY
1313
ARG CMAKE_VERSION
1414
ARG TARGETPLATFORM
1515

16-
LABEL maintainer="Hyperion Project <[email protected]>" \
17-
org.opencontainers.image.title="${DIST} ${SUITE} ${TARGETPLATFORM} - QT ${QT_VERSION}" \
18-
org.opencontainers.image.description="Compilation environment to build Hyperion for ${DIST} ${SUITE}" \
19-
org.opencontainers.image.url="${REPOSITORY}" \
20-
org.opencontainers.image.source="${REPOSITORY}/hyperion.docker-ci" \
21-
org.opencontainers.image.vendor="Hyperion Project" \
22-
org.opencontainers.image.documentation="https://docs.hyperion-project.org" \
23-
org.opencontainers.image.licenses="MIT"
24-
16+
ENV QEMU_EXECVE=1
2517
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
2618

2719
# update
@@ -91,4 +83,4 @@ fi
9183
RUN chmod +x /usr/bin/qemu-static
9284

9385
# set entrypoint
94-
ENTRYPOINT [ "/usr/bin/qemu-static", "/usr/bin/env", "QEMU_EXECVE=1" ]
86+
ENTRYPOINT [ "/usr/bin/qemu-static" ]

ubuntu_debian

+4-12
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ARG SUITE="buster"
33
ARG QT_VERSION="5"
44
ARG REPOSITORY="https://github.com/hyperion-project"
55
ARG CMAKE_VERSION="3.28.3"
6+
ARG DEBIAN_FRONTEND=noninteractive
67

78
FROM ${DIST}:${SUITE}
89

@@ -11,23 +12,14 @@ ARG SUITE
1112
ARG QT_VERSION
1213
ARG REPOSITORY
1314
ARG CMAKE_VERSION
15+
ARG DEBIAN_FRONTEND
1416
ARG TARGETPLATFORM
1517

16-
LABEL maintainer="Hyperion Project <[email protected]>" \
17-
org.opencontainers.image.title="${DIST} ${SUITE} ${TARGETPLATFORM} - QT ${QT_VERSION}" \
18-
org.opencontainers.image.description="Compilation environment to build Hyperion for ${DIST} ${SUITE}" \
19-
org.opencontainers.image.url="${REPOSITORY}" \
20-
org.opencontainers.image.source="${REPOSITORY}/hyperion.docker-ci" \
21-
org.opencontainers.image.vendor="Hyperion Project" \
22-
org.opencontainers.image.documentation="https://docs.hyperion-project.org" \
23-
org.opencontainers.image.licenses="MIT"
24-
18+
ENV QEMU_EXECVE=1
2519
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
2620
ENV DEBFULLNAME="Hyperion Project"
2721
ENV DEBEMAIL="[email protected]"
2822

29-
ARG DEBIAN_FRONTEND=noninteractive
30-
3123
# update
3224
RUN apt-get update
3325

@@ -128,4 +120,4 @@ RUN chmod +x /usr/bin/qemu-static
128120
RUN apt-get clean -q -y && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
129121

130122
# set entrypoint
131-
ENTRYPOINT [ "/usr/bin/qemu-static", "/usr/bin/env", "QEMU_EXECVE=1" ]
123+
ENTRYPOINT [ "/usr/bin/qemu-static" ]

0 commit comments

Comments
 (0)