Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulchen-Panther committed Feb 11, 2025
1 parent e07f867 commit 52a34db
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 51 deletions.
70 changes: 52 additions & 18 deletions .github/workflows/qt5_6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,32 @@ jobs:
if: ${{ !startsWith(github.repository, env.REPOSITORY) }}
run: echo "REPOSITORY=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV}

- name: 🛠️ Set up QEMU
uses: docker/setup-qemu-action@v3

- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: 🐳 Set up Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}
tags: ${{ inputs.qt_version == '6' && format('{0}-qt6', inputs.codename) || inputs.codename }}
labels: |
org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ inputs.distribution }} ${{ inputs.codename }}
org.opencontainers.image.vendor=Hyperion Project
org.opencontainers.image.authors=Hyperion Team
org.opencontainers.image.url=${{ github.server_url }}/${{ env.REPOSITORY }}
org.opencontainers.image.source=${{ github.server_url }}/${{ env.REPOSITORY }}/hyperion.docker-ci
org.opencontainers.image.documentation=https://docs.hyperion-project.org
org.opencontainers.image.licenses=MIT
annotations: |
org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ inputs.distribution }} ${{ inputs.codename }}
org.opencontainers.image.vendor=Hyperion Project
org.opencontainers.image.authors=Hyperion Team
org.opencontainers.image.url=${{ github.server_url }}/${{ env.REPOSITORY }}
org.opencontainers.image.source=${{ github.server_url }}/${{ env.REPOSITORY }}/hyperion.docker-ci
org.opencontainers.image.documentation=https://docs.hyperion-project.org
org.opencontainers.image.licenses=MIT
- name: 🔑 Login to GitHub Container Registry
if: ${{ env.SECRET_DOCKER_CI != null }}
uses: docker/login-action@v3
Expand All @@ -64,23 +84,15 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_CI }}

- name: 🐳 Set up Docker metadata
id: docker_metadata
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}
tags: type=sha

- name: 👷 Build and 🚀 Push digest to GitHub Container/Package Registry
id: docker_build
id: build
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.target_platform == 'armv6' && 'debian-armv6' || inputs.distribution == 'fedora' && 'fedora' || 'ubuntu_debian' }}
platforms: ${{ matrix.target_lookup[format('{0}',matrix.target_platform)] }}
labels: ${{ steps.meta.outputs.labels }}
provenance: false
labels: ${{ steps.docker_metadata.outputs.labels }}
annotations: ${{ steps.docker_metadata.outputs.annotations }}
outputs: type=image,name=ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }},push-by-digest=true,name-canonical=true,push=true
build-args: |
DIST=${{ inputs.distribution }}
Expand All @@ -92,7 +104,7 @@ jobs:
- name: ⬇ Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.docker_build.outputs.digest }}"
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: 📦 Upload digest
Expand All @@ -107,8 +119,6 @@ jobs:
name: 👷 Merge and 🚀 Push
needs: build_and_push
runs-on: ubuntu-22.04
env:
TAG: ${{ inputs.qt_version == '6' && format('{0}-qt6', inputs.codename) || inputs.codename }}

steps:
- name: 💾 Download digests
Expand All @@ -125,6 +135,29 @@ jobs:
- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: 🐳 Set up Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}
tags: ${{ inputs.qt_version == '6' && format('{0}-qt6', inputs.codename) || inputs.codename }}
labels: |
org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ inputs.distribution }} ${{ inputs.codename }}
org.opencontainers.image.vendor=Hyperion Project
org.opencontainers.image.authors=Hyperion Team
org.opencontainers.image.url=${{ github.server_url }}/${{ env.REPOSITORY }}
org.opencontainers.image.source=${{ github.server_url }}/${{ env.REPOSITORY }}/hyperion.docker-ci
org.opencontainers.image.documentation=https://docs.hyperion-project.org
org.opencontainers.image.licenses=MIT
annotations: |
org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ inputs.distribution }} ${{ inputs.codename }}
org.opencontainers.image.vendor=Hyperion Project
org.opencontainers.image.authors=Hyperion Team
org.opencontainers.image.url=${{ github.server_url }}/${{ env.REPOSITORY }}
org.opencontainers.image.source=${{ github.server_url }}/${{ env.REPOSITORY }}/hyperion.docker-ci
org.opencontainers.image.documentation=https://docs.hyperion-project.org
org.opencontainers.image.licenses=MIT
- name: 🔑 Login to GitHub Container Registry
if: ${{ env.SECRET_DOCKER_CI != null }}
uses: docker/login-action@v3
Expand All @@ -136,8 +169,9 @@ jobs:
- name: 📝 Create manifest list and 🚀 Push to GitHub Container/Package Registry
working-directory: /tmp/digests
run: |
docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}:${{ env.TAG }} $(printf 'ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}@sha256:%s ' *)
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf 'ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}@sha256:%s ' *)
- name: 👀 Inspect image
run: |
docker buildx imagetools inspect ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}:${{ env.TAG }}
docker buildx imagetools inspect ${{ steps.meta.outputs.tags }}
15 changes: 4 additions & 11 deletions debian-armv6
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,11 @@ ARG SUITE
ARG QT_VERSION
ARG REPOSITORY
ARG CMAKE_VERSION
ARG DEBIAN_FRONTEND=noninteractive
ARG TARGETPLATFORM

LABEL maintainer="Hyperion Project <[email protected]>" \
org.opencontainers.image.title="Debian ${SUITE} ${TARGETPLATFORM} - QT ${QT_VERSION}" \
org.opencontainers.image.description="Compilation environment to build Hyperion for Debian ${SUITE}" \
org.opencontainers.image.url="${REPOSITORY}" \
org.opencontainers.image.source="${REPOSITORY}/hyperion.docker-ci" \
org.opencontainers.image.vendor="Hyperion Project" \
org.opencontainers.image.documentation="https://docs.hyperion-project.org" \
org.opencontainers.image.licenses="MIT"

ARG DEBIAN_FRONTEND=noninteractive
ENV QEMU_EXECVE=1
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/arm/v6}

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

# set entrypoint
ENTRYPOINT [ "/usr/bin/qemu-static", "/usr/bin/env", "QEMU_EXECVE=1" ]
ENTRYPOINT [ "/usr/bin/qemu-static" ]
12 changes: 2 additions & 10 deletions fedora
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,7 @@ ARG REPOSITORY
ARG CMAKE_VERSION
ARG TARGETPLATFORM

LABEL maintainer="Hyperion Project <[email protected]>" \
org.opencontainers.image.title="${DIST} ${SUITE} ${TARGETPLATFORM} - QT ${QT_VERSION}" \
org.opencontainers.image.description="Compilation environment to build Hyperion for ${DIST} ${SUITE}" \
org.opencontainers.image.url="${REPOSITORY}" \
org.opencontainers.image.source="${REPOSITORY}/hyperion.docker-ci" \
org.opencontainers.image.vendor="Hyperion Project" \
org.opencontainers.image.documentation="https://docs.hyperion-project.org" \
org.opencontainers.image.licenses="MIT"

ENV QEMU_EXECVE=1
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}

# update
Expand Down Expand Up @@ -91,4 +83,4 @@ fi
RUN chmod +x /usr/bin/qemu-static

# set entrypoint
ENTRYPOINT [ "/usr/bin/qemu-static", "/usr/bin/env", "QEMU_EXECVE=1" ]
ENTRYPOINT [ "/usr/bin/qemu-static" ]
16 changes: 4 additions & 12 deletions ubuntu_debian
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ARG SUITE="buster"
ARG QT_VERSION="5"
ARG REPOSITORY="https://github.com/hyperion-project"
ARG CMAKE_VERSION="3.28.3"
ARG DEBIAN_FRONTEND=noninteractive

FROM ${DIST}:${SUITE}

Expand All @@ -11,23 +12,14 @@ ARG SUITE
ARG QT_VERSION
ARG REPOSITORY
ARG CMAKE_VERSION
ARG DEBIAN_FRONTEND
ARG TARGETPLATFORM

LABEL maintainer="Hyperion Project <[email protected]>" \
org.opencontainers.image.title="${DIST} ${SUITE} ${TARGETPLATFORM} - QT ${QT_VERSION}" \
org.opencontainers.image.description="Compilation environment to build Hyperion for ${DIST} ${SUITE}" \
org.opencontainers.image.url="${REPOSITORY}" \
org.opencontainers.image.source="${REPOSITORY}/hyperion.docker-ci" \
org.opencontainers.image.vendor="Hyperion Project" \
org.opencontainers.image.documentation="https://docs.hyperion-project.org" \
org.opencontainers.image.licenses="MIT"

ENV QEMU_EXECVE=1
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
ENV DEBFULLNAME="Hyperion Project"
ENV DEBEMAIL="[email protected]"

ARG DEBIAN_FRONTEND=noninteractive

# update
RUN apt-get update

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

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

0 comments on commit 52a34db

Please sign in to comment.