From 573c54f5e22e4b0be3eff863f7bc9e8753b9a1ba Mon Sep 17 00:00:00 2001 From: DaanSelen Date: Fri, 31 Oct 2025 14:10:06 +0100 Subject: [PATCH] Squashed commit of the following: commit fbdc7b08d91f1cce58f3a25f7438612e09d24bbd Author: DaanSelen Date: Fri Oct 31 13:25:46 2025 +0100 fix: logic for github attestant commit 5db2220ff97ebd41b44328d89f9f593f174d8632 Author: DaanSelen Date: Fri Oct 31 13:17:54 2025 +0100 chore: add registry prefix commit 238598047289776d13014739b020d5a5f0e3f182 Author: DaanSelen Date: Fri Oct 31 13:10:25 2025 +0100 revert: if condition commit d5906aa4c1ddbe4ce0ab371b697a4935568b0307 Author: DaanSelen Date: Fri Oct 31 13:08:53 2025 +0100 feat: try through computing commit af7759c24ee24e75be8eff259943192131c86190 Author: DaanSelen Date: Fri Oct 31 12:55:10 2025 +0100 comment: i am getting sloppy commit ff57fd9f368bd1d266b16caa076f6055ffdd45ad Author: DaanSelen Date: Fri Oct 31 12:54:49 2025 +0100 chore: indent fix commit 7ece71e954b8d664d21d85ff66b11858b44ee7bf Author: DaanSelen Date: Fri Oct 31 12:54:12 2025 +0100 chore: expand workflow but share certain actions commit 5045ca884f025652f7953acd56dfd5a0ea81967c Author: DaanSelen Date: Fri Oct 31 12:51:51 2025 +0100 chore: wrap in quotes commit b2bd34b0843b7143e23109bfcc9535364efaef20 Author: DaanSelen Date: Fri Oct 31 12:51:16 2025 +0100 chore: simplify syntax commit 57d440b286d873a7b8410ac811185be6865e6a66 Author: DaanSelen Date: Fri Oct 31 12:50:19 2025 +0100 fix: syntax commit 370ddbb2e05231a6abeb8a2cf8f665681c378bc7 Author: DaanSelen Date: Fri Oct 31 12:49:10 2025 +0100 fix: logic syntax commit eb1f6259c26294b82e4aa75ee8a9d77c24d36e1d Author: DaanSelen Date: Fri Oct 31 12:39:31 2025 +0100 fix: syntax commit 48f088b8b110f2db65cec6a2d21ec0e4bc0ae27a Author: DaanSelen Date: Fri Oct 31 12:36:26 2025 +0100 chore: try to push with personal account commit 5052a07164fa3c98c2e8a5a20e4b7290ecd88a22 Author: DaanSelen Date: Fri Oct 31 12:35:02 2025 +0100 chore: rework trigger per variant --- .github/workflows/docker-build.yml | 29 +++++++++++++++++++---------- .github/workflows/dockerhub.yml | 4 ++-- .github/workflows/github.yml | 6 +++--- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index e99b25a..66e62a7 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -8,7 +8,7 @@ on: types: [published] env: - IMAGE_NAME: paessler/multi-platform-probe + IMAGE_NAME: dselen/multi-platform-probe jobs: docker_build: @@ -28,6 +28,18 @@ jobs: - name: ghcr registry: "ghcr.io" steps: + - name: Set image for Docker + id: set-image + run: | + if [ "${{ matrix.variant.name }}" = "ghcr" ]; then + echo "IMAGE_TO_USE=${GITHUB_REPOSITORY}" >> $GITHUB_ENV + elif [ "${{ matrix.variant.name }}" == "dockerhub" ]; then + echo "IMAGE_TO_USE=${IMAGE_NAME}" >> $GITHUB_ENV + else + echo "Failing to resolve." + exit 1 + fi + - name: Check out the repository uses: actions/checkout@v5 @@ -43,6 +55,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub + if: matrix.variant.name == 'dockerhub' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} @@ -50,6 +63,7 @@ jobs: registry: ${{ matrix.variant.registry }} - name: Log in to Github Container Registry + if: matrix.variant.name == 'ghcr' uses: docker/login-action@v3 with: username: ${{ github.actor }} @@ -60,9 +74,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: | - ${{ env.IMAGE_NAME }} - ${{ github.repository }} + images: ${{ matrix.variant.registry }}/${{ env.IMAGE_TO_USE }} tags: | type=ref,event=branch type=ref,event=tag @@ -77,10 +89,7 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - platforms: | - - linux/amd64 - - linux/arm64 - - linux/arm/v7 + platforms: linux/amd64,linux/arm64,linux/arm/v7 - name: Generate artifact attestation if: matrix.variant.name == 'dockerhub' @@ -94,6 +103,6 @@ jobs: if: matrix.variant.name == 'ghcr' uses: actions/attest-build-provenance@v1 with: - subject-name: ${{ matrix.variant.registry }}/${{ env.IMAGE_NAME }} + subject-name: ${{ matrix.variant.registry }}/${{ github.repository }} subject-digest: ${{ steps.push.outputs.digest }} - push-to-registry: true \ No newline at end of file + push-to-registry: true diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 9207d6a..3f91013 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -3,8 +3,8 @@ name: Push to Docker Hub on: - release: - types: [published] +# release: +# types: [published] env: IMAGE_NAME: paessler/multi-platform-probe diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index 3d1e146..ecad5eb 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -3,9 +3,9 @@ name: Push to GitHub on: - push: - branches: ["main"] - tags: ["*"] +# push: +# branches: ["main"] +# tags: ["*"] env: REGISTRY: ghcr.io