From 0771c9dc2ad7730cc7fb9e1aedbdeb5629c3828e Mon Sep 17 00:00:00 2001 From: Yves Date: Fri, 7 Feb 2025 14:30:40 +0100 Subject: [PATCH] Update docker.yaml --- .github/workflows/docker.yaml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 6dd5afc..e3c33cb 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -1,5 +1,9 @@ name: Build Docker +permissions: + id-token: write + contents: write + on: push: tags: ["v*"] @@ -34,6 +38,13 @@ jobs: username: pgduckdb password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to GitHub Containers + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GH_TOKEN }} + - name: Checkout pg_duckdb extension code uses: actions/checkout@v4 with: @@ -60,7 +71,7 @@ jobs: - name: Attempt to pull previous image run: | docker pull pgduckdb/pgduckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ steps.compute_platform.outputs.branch_tag }}-latest || true - + docker pull ghcr.io/duckdb/pg_duckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ steps.compute_platform.outputs.branch_tag }}-latest || true - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -78,9 +89,11 @@ jobs: set: | *.platform=linux/${{ steps.compute_platform.outputs.platform }} *.cache-to=type=gha,mode=max + *.cache-from=type=registry,ref=pgduckdb/pgduckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ steps.compute_platform.outputs.branch_tag }}-latest + *.cache-from=type=registry,ref=ghcr.io/duckdb/pg_duckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ steps.compute_platform.outputs.branch_tag }}-latest *.cache-from=type=gha - postgres.tags=pgduckdb/pgduckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ github.sha }} - postgres.tags=pgduckdb/pgduckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ steps.compute_platform.outputs.branch_tag }}-latest + postgres.tags=ghcr.io/duckdb/pg_duckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ github.sha }} + postgres.tags=ghcr.io/duckdb/pg_duckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ steps.compute_platform.outputs.branch_tag }}-latest docker_merge: name: Merge Docker image for Postgres ${{ matrix.postgres }}