From 2ad6d6c57461cfc37f02a9d2d2d2d855d58e5688 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Thu, 16 Mar 2023 13:10:25 +0100 Subject: [PATCH 01/21] Add tags and stuff --- .github/workflows/build.yml | 25 ++++++++++++++++++------- Containerfile | 3 ++- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bb727cce4..f13b376f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,6 +31,7 @@ jobs: matrix: image_name: [silverblue, kinoite, vauxite, sericea, base, lxqt, mate] major_version: [37, 38] + platform: ["linux/amd64", "linux/arm/v6", "linux/arm64"] include: - major_version: 37 is_latest_version: true @@ -61,6 +62,11 @@ jobs: id: generate-tags shell: bash run: | + PLAFTORM_TAG="" + if ! [[ "${{ matrix.platform }}" == "linux/amd64" ]]; then + PLAFTORM_TAG="-${${{ matrix.platform }}/"linux/"/}" + fi + # Generate a timestamp for creating an image version history TIMESTAMP="$(date +%Y%m%d)" MAJOR_VERSION="${{ matrix.major_version }}" @@ -68,20 +74,20 @@ jobs: BUILD_TAGS=() # Have tags for tracking builds during pull request SHA_SHORT="$(git rev-parse --short HEAD)" - COMMIT_TAGS+=("pr-${{ github.event.number }}-${MAJOR_VERSION}") - COMMIT_TAGS+=("${SHA_SHORT}-${MAJOR_VERSION}") + COMMIT_TAGS+=("pr-${{ github.event.number }}-${MAJOR_VERSION}${PLAFTORM_TAG}") + COMMIT_TAGS+=("${SHA_SHORT}-${MAJOR_VERSION}${PLAFTORM_TAG}") if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \ [[ "${{ matrix.is_stable_version }}" == "true" ]]; then - COMMIT_TAGS+=("pr-${{ github.event.number }}") - COMMIT_TAGS+=("${SHA_SHORT}") + COMMIT_TAGS+=("pr-${{ github.event.number }}${PLAFTORM_TAG}") + COMMIT_TAGS+=("${SHA_SHORT}${PLAFTORM_TAG}") fi - BUILD_TAGS=("${MAJOR_VERSION}" "${MAJOR_VERSION}-${TIMESTAMP}") + BUILD_TAGS=("${MAJOR_VERSION}${PLAFTORM_TAG}" "${MAJOR_VERSION}-${TIMESTAMP}${PLAFTORM_TAG}") if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \ [[ "${{ matrix.is_stable_version }}" == "true" ]]; then - BUILD_TAGS+=("${TIMESTAMP}") - BUILD_TAGS+=("latest") + BUILD_TAGS+=("${TIMESTAMP}${PLAFTORM_TAG}") + BUILD_TAGS+=("latest${PLAFTORM_TAG}") fi if [[ "${{ github.event_name }}" == "pull_request" ]]; then @@ -103,6 +109,10 @@ jobs: done echo "alias_tags=${alias_tags[*]}" >> $GITHUB_OUTPUT + # debug crash + - name: debug crash + run: exit 1 + # Build metadata - name: Image Metadata uses: docker/metadata-action@v4 @@ -130,6 +140,7 @@ jobs: IMAGE_NAME=${{ matrix.image_name }} SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} FEDORA_MAJOR_VERSION=${{ matrix.major_version }} + BUILD_PLATFORM=${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} oci: false diff --git a/Containerfile b/Containerfile index 38e6d1176..e5e90d643 100644 --- a/Containerfile +++ b/Containerfile @@ -2,8 +2,9 @@ ARG IMAGE_NAME="${IMAGE_NAME:-silverblue}" ARG SOURCE_IMAGE="${SOURCE_IMAGE:-silverblue}" ARG BASE_IMAGE="quay.io/fedora-ostree-desktops/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-37}" +ARG PLATFORM="${BUILD_PLATFORM:-linux/amd64}" -FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder +FROM --platform=${PLATFORM} ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder ARG IMAGE_NAME="${IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" From 69ae3f6b2b6f8eba08adb2620daa1d79e15da8a4 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Thu, 16 Mar 2023 13:16:48 +0100 Subject: [PATCH 02/21] Fix tag generation --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f13b376f7..cb3301911 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,8 +63,10 @@ jobs: shell: bash run: | PLAFTORM_TAG="" - if ! [[ "${{ matrix.platform }}" == "linux/amd64" ]]; then - PLAFTORM_TAG="-${${{ matrix.platform }}/"linux/"/}" + UNCLEAN_PLATFORM="${{ matrix.platform }}" + CLEANED_PLATFORM="${UNCLEAN_PLATFORM/"linux/"/""}" + if ! [[ "$UNCLEAN_PLATFORM" == "linux/amd64" ]]; then + PLAFTORM_TAG="-$CLEANED_PLATFORM" fi # Generate a timestamp for creating an image version history From e665306a0ed63e7c48acfe08167a64395f20e8db Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Thu, 16 Mar 2023 13:19:05 +0100 Subject: [PATCH 03/21] Clean the platform tag up even more --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb3301911..659cb610b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,8 +65,9 @@ jobs: PLAFTORM_TAG="" UNCLEAN_PLATFORM="${{ matrix.platform }}" CLEANED_PLATFORM="${UNCLEAN_PLATFORM/"linux/"/""}" + CLEANER_PLATFORM="${CLEANED_PLATFORM}/"/"/""}" if ! [[ "$UNCLEAN_PLATFORM" == "linux/amd64" ]]; then - PLAFTORM_TAG="-$CLEANED_PLATFORM" + PLAFTORM_TAG="-$CLEANER_PLATFORM" fi # Generate a timestamp for creating an image version history From 7fdd21f56b146b4da6d1e2973142ed28fccc0d68 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Thu, 16 Mar 2023 13:20:46 +0100 Subject: [PATCH 04/21] undo previous commit --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 659cb610b..cb3301911 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,9 +65,8 @@ jobs: PLAFTORM_TAG="" UNCLEAN_PLATFORM="${{ matrix.platform }}" CLEANED_PLATFORM="${UNCLEAN_PLATFORM/"linux/"/""}" - CLEANER_PLATFORM="${CLEANED_PLATFORM}/"/"/""}" if ! [[ "$UNCLEAN_PLATFORM" == "linux/amd64" ]]; then - PLAFTORM_TAG="-$CLEANER_PLATFORM" + PLAFTORM_TAG="-$CLEANED_PLATFORM" fi # Generate a timestamp for creating an image version history From 7c18621c5068239e9e9b9d409e7d05f537154f12 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Thu, 16 Mar 2023 13:22:10 +0100 Subject: [PATCH 05/21] Disable debug crash --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb3301911..ed21f6f39 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -111,10 +111,6 @@ jobs: done echo "alias_tags=${alias_tags[*]}" >> $GITHUB_OUTPUT - # debug crash - - name: debug crash - run: exit 1 - # Build metadata - name: Image Metadata uses: docker/metadata-action@v4 From 5a0debcd4cae026eb21e5d9f5cb9b83ce6b94021 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Thu, 16 Mar 2023 13:36:20 +0100 Subject: [PATCH 06/21] Add platform argument to build image step --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed21f6f39..a0348187a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -140,6 +140,7 @@ jobs: FEDORA_MAJOR_VERSION=${{ matrix.major_version }} BUILD_PLATFORM=${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} + platform: ${{ matrix.platform }} oci: false # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. From e8725712c5e67a0a9264c61f9515e0d0a191f119 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Tue, 21 Mar 2023 10:59:41 +0100 Subject: [PATCH 07/21] Attempt to fix multi-arch workflow --- .github/workflows/build.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0348187a..dc255cbb0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: matrix: image_name: [silverblue, kinoite, vauxite, sericea, base, lxqt, mate] major_version: [37, 38] - platform: ["linux/amd64", "linux/arm/v6", "linux/arm64"] + platform: ["linux/amd64" "linux/arm64"] include: - major_version: 37 is_latest_version: true @@ -58,6 +58,14 @@ jobs: fi echo "IMAGE_NAME=${{ format('{0}-{1}', matrix.image_name, env.IMAGE_BASE_NAME) }}" >> $GITHUB_ENV + - name: Run find-and-replace to remove linux/ from arch + uses: mad9000/actions-find-and-replace-string@1 + id: arch + with: + source: ${{ matrix.platform }} + find: 'linux/' + replace: '' + - name: Generate tags id: generate-tags shell: bash @@ -141,6 +149,7 @@ jobs: BUILD_PLATFORM=${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} platform: ${{ matrix.platform }} + arch: ${{ steps.arch.outputs.value }} oci: false # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. From aadeb3793a9473a4c604546badbb40e8895530e8 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:00:46 +0100 Subject: [PATCH 08/21] Fix syntax error in action --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc255cbb0..899fdcfcc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: matrix: image_name: [silverblue, kinoite, vauxite, sericea, base, lxqt, mate] major_version: [37, 38] - platform: ["linux/amd64" "linux/arm64"] + platform: ["linux/amd64", "linux/arm64"] include: - major_version: 37 is_latest_version: true From 29fddf5a45937c4fdf7057a50ebed92a0793f903 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:02:04 +0100 Subject: [PATCH 09/21] Re-run multi-arch action --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 899fdcfcc..3f360eafe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -151,6 +151,7 @@ jobs: platform: ${{ matrix.platform }} arch: ${{ steps.arch.outputs.value }} oci: false + # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. # https://github.com/macbre/push-to-ghcr/issues/12 From f2416d15f2e5232302425a2c776cb455cc69e832 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:07:02 +0100 Subject: [PATCH 10/21] Add workflow_dispatch --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f360eafe..e9113b905 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,6 @@ name: build-ublue on: + workflow_dispatch: pull_request: branches: - main From e7e897a6b198c5565881d10e1b74581b17ab7a1c Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:08:18 +0100 Subject: [PATCH 11/21] Remove platform option from buildah --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e9113b905..fb8a7cf19 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,7 +149,6 @@ jobs: FEDORA_MAJOR_VERSION=${{ matrix.major_version }} BUILD_PLATFORM=${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} - platform: ${{ matrix.platform }} arch: ${{ steps.arch.outputs.value }} oci: false From df37c923f2c2afe40e62fb3c10cf40a22bcba285 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:13:27 +0100 Subject: [PATCH 12/21] Remove platform stuff from Containerfile --- .github/workflows/build.yml | 1 - Containerfile | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb8a7cf19..747cec2a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -147,7 +147,6 @@ jobs: IMAGE_NAME=${{ matrix.image_name }} SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} FEDORA_MAJOR_VERSION=${{ matrix.major_version }} - BUILD_PLATFORM=${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} arch: ${{ steps.arch.outputs.value }} oci: false diff --git a/Containerfile b/Containerfile index e5e90d643..38e6d1176 100644 --- a/Containerfile +++ b/Containerfile @@ -2,9 +2,8 @@ ARG IMAGE_NAME="${IMAGE_NAME:-silverblue}" ARG SOURCE_IMAGE="${SOURCE_IMAGE:-silverblue}" ARG BASE_IMAGE="quay.io/fedora-ostree-desktops/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-37}" -ARG PLATFORM="${BUILD_PLATFORM:-linux/amd64}" -FROM --platform=${PLATFORM} ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder +FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder ARG IMAGE_NAME="${IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" From 29ef37fb5d0c905240debd5e272f649f22ec3d80 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:38:48 +0100 Subject: [PATCH 13/21] Fix buildah invocation --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 747cec2a3..c6bf487a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -148,7 +148,7 @@ jobs: SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} FEDORA_MAJOR_VERSION=${{ matrix.major_version }} labels: ${{ steps.meta.outputs.labels }} - arch: ${{ steps.arch.outputs.value }} + archs: ${{ steps.arch.outputs.value }} oci: false From 65c59bc15bb80d7733dcc07012810f69a7f71cf0 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:28:02 +0200 Subject: [PATCH 14/21] attempt to get it worknig --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c6bf487a6..c546c0538 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,6 +149,7 @@ jobs: FEDORA_MAJOR_VERSION=${{ matrix.major_version }} labels: ${{ steps.meta.outputs.labels }} archs: ${{ steps.arch.outputs.value }} + platform: ${{ matrix.platform }} oci: false From 4bb131bc7d199298c76bc05357c0062553facec0 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:38:06 +0200 Subject: [PATCH 15/21] Fix buildah action invocation --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 67dbf6d0c..1eeab5e05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -155,7 +155,6 @@ jobs: SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} FEDORA_MAJOR_VERSION=${{ matrix.major_version }} labels: ${{ steps.meta.outputs.labels }} - archs: ${{ steps.arch.outputs.value }} platform: ${{ matrix.platform }} oci: false From 3951902f8a470e827c393437fd73f06b83695650 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:48:12 +0200 Subject: [PATCH 16/21] Add platform to FROM in Containerfile --- .github/workflows/build.yml | 1 + Containerfile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1eeab5e05..dc6be0b66 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -154,6 +154,7 @@ jobs: IMAGE_NAME=${{ matrix.image_name }} SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} FEDORA_MAJOR_VERSION=${{ matrix.major_version }} + PLATFORM=${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} platform: ${{ matrix.platform }} oci: false diff --git a/Containerfile b/Containerfile index 38e6d1176..d985bcb86 100644 --- a/Containerfile +++ b/Containerfile @@ -2,8 +2,9 @@ ARG IMAGE_NAME="${IMAGE_NAME:-silverblue}" ARG SOURCE_IMAGE="${SOURCE_IMAGE:-silverblue}" ARG BASE_IMAGE="quay.io/fedora-ostree-desktops/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-37}" +ARG PLATFORM -FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder +FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} --platform ${PLATFORM} AS builder ARG IMAGE_NAME="${IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" From a3014a62eec39d4a2b4c006ce3b5bee6eb52489b Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:49:00 +0200 Subject: [PATCH 17/21] Fix containerfile --- Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index d985bcb86..f93351026 100644 --- a/Containerfile +++ b/Containerfile @@ -4,7 +4,7 @@ ARG BASE_IMAGE="quay.io/fedora-ostree-desktops/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-37}" ARG PLATFORM -FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} --platform ${PLATFORM} AS builder +FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder --platform ${PLATFORM} ARG IMAGE_NAME="${IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" From 4f3e719a8c6082aac79f13c3e68fb00ac37c51fc Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:51:26 +0200 Subject: [PATCH 18/21] Attempt at fixing Containerfile --- Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index f93351026..cf95edb40 100644 --- a/Containerfile +++ b/Containerfile @@ -4,7 +4,7 @@ ARG BASE_IMAGE="quay.io/fedora-ostree-desktops/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-37}" ARG PLATFORM -FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder --platform ${PLATFORM} +FROM --platform ${PLATFORM} ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder ARG IMAGE_NAME="${IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" From 1fe0b3de1eb4b5671c9571643fef45fd8b780a3b Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:52:41 +0200 Subject: [PATCH 19/21] Add some debug stuff --- .github/workflows/build.yml | 1 - Containerfile | 2 +- build.sh | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc6be0b66..1eeab5e05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -154,7 +154,6 @@ jobs: IMAGE_NAME=${{ matrix.image_name }} SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} FEDORA_MAJOR_VERSION=${{ matrix.major_version }} - PLATFORM=${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} platform: ${{ matrix.platform }} oci: false diff --git a/Containerfile b/Containerfile index cf95edb40..4fba61c51 100644 --- a/Containerfile +++ b/Containerfile @@ -4,7 +4,7 @@ ARG BASE_IMAGE="quay.io/fedora-ostree-desktops/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-37}" ARG PLATFORM -FROM --platform ${PLATFORM} ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder +FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder ARG IMAGE_NAME="${IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" diff --git a/build.sh b/build.sh index 2158ad869..35a970cbc 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,7 @@ #!/bin/sh +uname -m + set -ouex pipefail RELEASE="$(rpm -E %fedora)" From f79f7cf98e320c65f7eab5f61f6778026f3f9a5e Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:56:30 +0200 Subject: [PATCH 20/21] Add setting up QEMU action --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1eeab5e05..01a0b611e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,6 +50,9 @@ jobs: - name: Checkout Push to Registry action uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Matrix Variables run: | if [[ "${{ matrix.image_name }}" == "lxqt" || "${{ matrix.image_name }}" == "mate" ]]; then From 659bccbc3a68c23b582ed011291d28533d6fe807 Mon Sep 17 00:00:00 2001 From: piano1029 <46605242+piano1029@users.noreply.github.com> Date: Mon, 24 Apr 2023 16:54:36 +0200 Subject: [PATCH 21/21] Switch to Fedora desktop images built by Stable OS, more architectures --- .github/workflows/build.yml | 4 ++++ Containerfile | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 01a0b611e..4e5fa0fd3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -143,6 +143,9 @@ jobs: io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/main/main/README.md io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4 + - name: Set architecture env + run: echo "ARCHITECTURE=${PLATFORM/"linux/"/""}" >> $GITHUB_ENV + # Build image using Buildah action - name: Build Image id: build_image @@ -157,6 +160,7 @@ jobs: IMAGE_NAME=${{ matrix.image_name }} SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} FEDORA_MAJOR_VERSION=${{ matrix.major_version }} + ARCHITECTURE=${{ env.ARCHITECTURE }} labels: ${{ steps.meta.outputs.labels }} platform: ${{ matrix.platform }} oci: false diff --git a/Containerfile b/Containerfile index 4fba61c51..d829d7b2f 100644 --- a/Containerfile +++ b/Containerfile @@ -1,10 +1,11 @@ ARG IMAGE_NAME="${IMAGE_NAME:-silverblue}" ARG SOURCE_IMAGE="${SOURCE_IMAGE:-silverblue}" -ARG BASE_IMAGE="quay.io/fedora-ostree-desktops/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-37}" -ARG PLATFORM +ARG ARCHITECTURE="${ARCHITECTURE:-x86_64}" +ARG BASE_IMAGE="ghcr.io/stable-os/fedora-ostree-desktop-${SOURCE_IMAGE}:latest-${FEDORA_MAJOR_VERSION}-${ARCHITECTURE}" -FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder +FROM silverblue:latest-39-arm64 +FROM ${BASE_IMAGE} AS builder ARG IMAGE_NAME="${IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}"