From f746df6d2719a536ad6c965aec101a4d2c8f8b5d Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 13 Dec 2023 00:55:56 +0100 Subject: [PATCH 01/10] back to archs --- .gitea/workflows/container.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index 37503c9..2d33370 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -12,7 +12,7 @@ jobs: with: image: docker.io/thallian/alpine-s6 tags: ${{ gitea.ref_name }} ${{ gitea.sha }} latest - platforms: linux/aarch64, linux/x86_64 + archs: arm64, amd64 containerfiles: | ./Containerfile - name: Log in to Dockerhub From aabc3ec759fcfee60c3ccc795845da42ab18fb9f Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 13 Dec 2023 01:11:44 +0100 Subject: [PATCH 02/10] try pushing image --- .gitea/workflows/container.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index 2d33370..2a53e6b 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -15,9 +15,12 @@ jobs: archs: arm64, amd64 containerfiles: | ./Containerfile - - name: Log in to Dockerhub - uses: redhat-actions/podman-login@v1 + - name: Push to dockerhub + id: push-to-dockerhub + uses: redhat-actions/push-to-registry@v2 with: + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} registry: docker.io username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_PW }} From e9158f00b8d4aa90d9f0f3816744f1ce3672e7a8 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 13 Dec 2023 01:13:57 +0100 Subject: [PATCH 03/10] try pushing image --- .gitea/workflows/container.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index 2a53e6b..0e7bcbe 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -10,8 +10,8 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 with: - image: docker.io/thallian/alpine-s6 - tags: ${{ gitea.ref_name }} ${{ gitea.sha }} latest + image: thallian/alpine-s6 + tags: ${{ gitea.ref_name }} ${{ gitea.sha }} archs: arm64, amd64 containerfiles: | ./Containerfile From 1893984702fe28df5171c91de95ab7207648ff68 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 13 Dec 2023 01:17:37 +0100 Subject: [PATCH 04/10] remove woodpecker config --- .woodpecker.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index 13bf6c9..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -1,11 +0,0 @@ -pipeline: - publish-docker-image: - image: plugins/kaniko - settings: - repo: docker.io/thallian/alpine-s6 - tags: latest,${CI_COMMIT_SHA:0:8},${CI_COMMIT_TAG=pre} - dockerfile: Dockerfile - username: - from_secret: DOCKER_USER - password: - from_secret: DOCKER_PW \ No newline at end of file From de9aca741a961641d9ba8b9668f8bd655909c477 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 13 Dec 2023 01:18:46 +0100 Subject: [PATCH 05/10] make action config generic --- .gitea/workflows/container.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index 0e7bcbe..1e73141 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -10,7 +10,7 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 with: - image: thallian/alpine-s6 + image: ${{ secrets.DOCKERHUB_USER }}/${{ gitea.repository }} tags: ${{ gitea.ref_name }} ${{ gitea.sha }} archs: arm64, amd64 containerfiles: | From 2579d00255d05f4fc42b4e5d4f7d40a46559211e Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 13 Dec 2023 01:24:26 +0100 Subject: [PATCH 06/10] try again --- .gitea/workflows/container.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index 1e73141..b73fcef 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -6,11 +6,16 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v3 + - name: Split branch name + env: + REPO: ${{ gitea.repository }} + id: split + run: echo "::set-output name=repo_name::${REPO##*/}" - name: Build image id: build-image uses: redhat-actions/buildah-build@v2 with: - image: ${{ secrets.DOCKERHUB_USER }}/${{ gitea.repository }} + image: ${{ secrets.DOCKERHUB_USER }}/${{ steps.split.outputs.repo_name }} tags: ${{ gitea.ref_name }} ${{ gitea.sha }} archs: arm64, amd64 containerfiles: | From 68892d88643a2d4b812ebaf23139e7876e91038a Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 13 Dec 2023 09:58:01 +0100 Subject: [PATCH 07/10] try sharedf workflow --- .gitea/workflows/container.yaml | 39 +++++++++------------------------ 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index b73fcef..174aded 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -1,31 +1,12 @@ -name: Build Container Image +name: Build Multiarch Container Image on: [push] jobs: - build-container: - runs-on: buildah-latest - steps: - - name: Check out repository code - uses: actions/checkout@v3 - - name: Split branch name - env: - REPO: ${{ gitea.repository }} - id: split - run: echo "::set-output name=repo_name::${REPO##*/}" - - name: Build image - id: build-image - uses: redhat-actions/buildah-build@v2 - with: - image: ${{ secrets.DOCKERHUB_USER }}/${{ steps.split.outputs.repo_name }} - tags: ${{ gitea.ref_name }} ${{ gitea.sha }} - archs: arm64, amd64 - containerfiles: | - ./Containerfile - - name: Push to dockerhub - id: push-to-dockerhub - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ steps.build-image.outputs.image }} - tags: ${{ steps.build-image.outputs.tags }} - registry: docker.io - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PW }} + call-reusable-workflow: + uses: https://new.code.vanwa.ch/container/multiarch-build-workflow/workflow.yml@main + with: + repository: ${{ gitea.repository }} + ref_name: ${{ gitea.ref_name }} + sha: ${{ gitea.sha }} + registry_url: ${{ secrets.REGISTRY_URL }} + registry_user: ${{ secrets.REGISTRY_USER }} + registry_pw: ${{ secrets.REGISTRY_PW }} From 965511ec23657c80f062ce9bddc987a4b1ebbc6e Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 13 Dec 2023 09:58:49 +0100 Subject: [PATCH 08/10] try shared workflow --- .gitea/workflows/container.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index 174aded..32bb83e 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -2,7 +2,7 @@ name: Build Multiarch Container Image on: [push] jobs: call-reusable-workflow: - uses: https://new.code.vanwa.ch/container/multiarch-build-workflow/workflow.yml@main + uses: container/multiarch-build-workflow/workflow.yml@main with: repository: ${{ gitea.repository }} ref_name: ${{ gitea.ref_name }} From b5bafe81ad6af53aad99416a73d34ee96be14b87 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 13 Dec 2023 10:00:51 +0100 Subject: [PATCH 09/10] proper shared workflow path --- .gitea/workflows/container.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index 32bb83e..ca827c5 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -2,7 +2,7 @@ name: Build Multiarch Container Image on: [push] jobs: call-reusable-workflow: - uses: container/multiarch-build-workflow/workflow.yml@main + uses: container/multiarch-build-workflow/.gitea/workflows/build.yml@main with: repository: ${{ gitea.repository }} ref_name: ${{ gitea.ref_name }} From 48ad6073a16a61542008b6512a22d27ad397f1fc Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 13 Dec 2023 10:01:26 +0100 Subject: [PATCH 10/10] yaml instead of yml --- .gitea/workflows/container.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index ca827c5..e48b3fd 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -2,7 +2,7 @@ name: Build Multiarch Container Image on: [push] jobs: call-reusable-workflow: - uses: container/multiarch-build-workflow/.gitea/workflows/build.yml@main + uses: container/multiarch-build-workflow/.gitea/workflows/build.yaml@main with: repository: ${{ gitea.repository }} ref_name: ${{ gitea.ref_name }}