From cb28e9945356eb47c57cfcbdd538405cb1f8cc37 Mon Sep 17 00:00:00 2001 From: Andy Pfister Date: Thu, 16 Jan 2025 00:09:02 +0100 Subject: [PATCH] Build additional tags (#84) --- .github/workflows/ci.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc02d30..89fc85e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,6 +84,7 @@ jobs: # renovate: datasource=docker depName=alpine versioning=docker OS_VERSION: "3.21" - flavor: "bookworm" + alias: "debian" pg_target: - "12" - "13" @@ -114,6 +115,7 @@ jobs: tags: | "pgautoupgrade/pgautoupgrade:${{ matrix.pg_target }}-${{ matrix.operating_system.flavor }}" "pgautoupgrade/pgautoupgrade:${{ matrix.pg_target }}-${{ matrix.operating_system.flavor }}${{ matrix.operating_system.OS_VERSION }}" + "pgautoupgrade/pgautoupgrade:${{ matrix.pg_target }}-${{ matrix.operating_system.alias }}" build-args: | "PGTARGET=${{ matrix.pg_target }}" cache-to: type=inline @@ -147,13 +149,29 @@ jobs: tags: | "pgautoupgrade/pgautoupgrade:${{ matrix.pg_target }}-${{ matrix.operating_system.flavor }}" "pgautoupgrade/pgautoupgrade:${{ matrix.pg_target }}-${{ matrix.operating_system.flavor }}${{ matrix.operating_system.OS_VERSION }}" + "pgautoupgrade/pgautoupgrade:${{ matrix.pg_target }}-${{ matrix.operating_system.alias }}" build-args: | "PGTARGET=${{ matrix.pg_target }}" push: true cache-to: type=inline cache-from: "${{ env.CACHE_FROM }}" - - name: Push latest image + - name: Push latest image for each supported OS + if: github.repository == 'pgautoupgrade/docker-pgautoupgrade' && github.ref == 'refs/heads/main' && matrix.pg_target == env.LATEST_POSTGRES_VERSION + uses: docker/build-push-action@v6 + with: + file: "Dockerfile.${{ matrix.operating_system.flavor }}" + platforms: linux/amd64,linux/arm64 + tags: | + "pgautoupgrade/pgautoupgrade:${{ matrix.operating_system.flavor }}" + "pgautoupgrade/pgautoupgrade:${{ matrix.operating_system.alias }}" + build-args: | + "PGTARGET=${{ matrix.pg_target }}" + push: true + cache-to: type=inline + cache-from: "${{ env.CACHE_FROM }}" + + - name: Push general latest image if: github.repository == 'pgautoupgrade/docker-pgautoupgrade' && github.ref == 'refs/heads/main' && matrix.pg_target == env.LATEST_POSTGRES_VERSION && matrix.operating_system.flavor == 'alpine' uses: docker/build-push-action@v6 with: