From e63fef2ef5bb9e80e1751290d1b64839d7b0ecbc Mon Sep 17 00:00:00 2001 From: Denis Cornehl Date: Wed, 5 Feb 2025 05:49:42 +0100 Subject: [PATCH 1/4] Revert "Remove latest suffix as it already has" This reverts commit 1e19333f1f103d92fc7edea2c5f4206915317c3b. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ed46a83..627bc4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,7 +54,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ghcr.io/${{ github.repository }}/${{ matrix.image }} + images: ghcr.io/${{ github.repository }}/${{ matrix.image }}:latest - name: Build and push uses: docker/build-push-action@v6 From 940f98ac7bc42985da64d6d198154a22cd2fc3b9 Mon Sep 17 00:00:00 2001 From: Denis Cornehl Date: Wed, 5 Feb 2025 05:49:42 +0100 Subject: [PATCH 2/4] Revert "Use metadata instead of tags" This reverts commit f44df20b48ffa931ebbdf55834cd41633be1a7d9. --- .github/workflows/main.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 627bc4c..bdecb64 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,16 +50,11 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} if: github.event_name == 'push' && github.ref == 'refs/heads/master' - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository }}/${{ matrix.image }}:latest - - name: Build and push uses: docker/build-push-action@v6 with: context: ${{ matrix.image }}/ push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: | + ghcr.io/${{ github.repository }}/${{ matrix.image }}:latest + ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ github.sha }} From de2d5e9b9aa0db58a3b5a0840eda993b0571e26f Mon Sep 17 00:00:00 2001 From: Denis Cornehl Date: Wed, 5 Feb 2025 05:49:42 +0100 Subject: [PATCH 3/4] Revert "Fix expression" This reverts commit f966ebb6a0c1d2415571ff410500699555ded066. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bdecb64..0945887 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,7 +54,7 @@ jobs: uses: docker/build-push-action@v6 with: context: ${{ matrix.image }}/ - push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + push: github.event_name == 'push' && github.ref == 'refs/heads/master' tags: | ghcr.io/${{ github.repository }}/${{ matrix.image }}:latest ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ github.sha }} From 05d99dbb1ec26563dd952b2ac034525bd5cb1133 Mon Sep 17 00:00:00 2001 From: Denis Cornehl Date: Wed, 5 Feb 2025 05:49:42 +0100 Subject: [PATCH 4/4] Revert "chore: add Git commit sha to container tags" This reverts commit b642ff317ea56abba33cc5e16197187e156ff397. --- .github/workflows/main.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0945887..277adeb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,6 +42,9 @@ jobs: - name: Checkout the source code uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build -t ghcr.io/${{ github.repository }}/${{ matrix.image }}:latest ${{ matrix.image }}/ + - name: Authenticate with GitHub Container Registry uses: docker/login-action@v3 with: @@ -50,11 +53,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} if: github.event_name == 'push' && github.ref == 'refs/heads/master' - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: ${{ matrix.image }}/ - push: github.event_name == 'push' && github.ref == 'refs/heads/master' - tags: | - ghcr.io/${{ github.repository }}/${{ matrix.image }}:latest - ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ github.sha }} + - name: Upload the Docker image to GitHub Container Registry + run: docker push ghcr.io/${{ github.repository }}/${{ matrix.image }}:latest + if: github.event_name == 'push' && github.ref == 'refs/heads/master'