From db1f03b0e08b04378fd790e4e77075a52b858665 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 2 Oct 2025 00:38:14 +0100 Subject: [PATCH 1/5] ci(docker): replace GHCR_PAT with GITHUB_TOKEN --- .github/workflows/docker.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index eeba32a..86e7fd0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -42,9 +42,7 @@ jobs: with: registry: ${{ env.REGISTRY }} username: ${{ github.repository_owner }} - # Using PAT as a hack due to issues with GITHUB_TOKEN and package permissions - # This should be reverted to use GITHUB_TOKEN once a solution is discovered. - password: ${{ secrets.GHCR_PAT }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) id: meta From ac22adde6765a2d940d64a06e518ca4784b17917 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 2 Oct 2025 00:39:00 +0100 Subject: [PATCH 2/5] ci(docker): simplify conditional for workflow_dispatch input handling Don't skip Docker login, doesn't really match the input option --- .github/workflows/docker.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 86e7fd0..0fb9f95 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -37,7 +37,6 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to Container Registry - if: github.event_name != 'workflow_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.push == 'true' uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} @@ -57,7 +56,7 @@ jobs: type=raw,value=latest,enable={{is_default_branch}} - name: Build and push ${{ matrix.image }} image - if: github.event_name != 'workflow_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.push == 'true' + if: github.event_name != 'workflow_dispatch' || inputs.push == 'true' uses: docker/build-push-action@v6 with: context: . From 5a498a5f7ad963928865b9b15e0171b007ef993d Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 2 Oct 2025 13:21:12 +0100 Subject: [PATCH 3/5] ci(docker): login before buildx setup --- .github/workflows/docker.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0fb9f95..6294b87 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -33,16 +33,16 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to Container Registry + - name: Log in to container registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Extract metadata (tags, labels) id: meta uses: docker/metadata-action@v5 From 3eb413086589659a1c815a79fd89b63ecc1e314a Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 2 Oct 2025 13:54:00 +0100 Subject: [PATCH 4/5] ci(docker): fix push condition for build step --- .github/workflows/docker.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6294b87..40c11eb 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -56,13 +56,12 @@ jobs: type=raw,value=latest,enable={{is_default_branch}} - name: Build and push ${{ matrix.image }} image - if: github.event_name != 'workflow_dispatch' || inputs.push == 'true' uses: docker/build-push-action@v6 with: context: . file: docker/${{ matrix.image }}.Dockerfile platforms: linux/amd64,linux/arm64 - push: true + push: ${{ github.event_name != 'workflow_dispatch' || inputs.push == 'true' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha,scope=${{ matrix.image }} From 31a95ed94693014169dd438d8e3a06a78b4d0c7e Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 2 Oct 2025 13:54:30 +0100 Subject: [PATCH 5/5] ci(docker): simplify image name template --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 40c11eb..815a668 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -47,7 +47,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/patchmon-${{ matrix.image }} + images: ${{ env.REGISTRY }}/${{ github.repository }}-${{ matrix.image }} tags: | type=ref,event=pr type=semver,pattern={{version}}