Skip to content

Commit 0771c9d

Browse files
committed
Update docker.yaml
1 parent 23ebb63 commit 0771c9d

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/docker.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Build Docker
22

3+
permissions:
4+
id-token: write
5+
contents: write
6+
37
on:
48
push:
59
tags: ["v*"]
@@ -34,6 +38,13 @@ jobs:
3438
username: pgduckdb
3539
password: ${{ secrets.DOCKERHUB_TOKEN }}
3640

41+
- name: Login to GitHub Containers
42+
uses: docker/login-action@v3
43+
with:
44+
registry: ghcr.io
45+
username: ${{ github.actor }}
46+
password: ${{ secrets.GH_TOKEN }}
47+
3748
- name: Checkout pg_duckdb extension code
3849
uses: actions/checkout@v4
3950
with:
@@ -60,7 +71,7 @@ jobs:
6071
- name: Attempt to pull previous image
6172
run: |
6273
docker pull pgduckdb/pgduckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ steps.compute_platform.outputs.branch_tag }}-latest || true
63-
74+
docker pull ghcr.io/duckdb/pg_duckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ steps.compute_platform.outputs.branch_tag }}-latest || true
6475
6576
- name: Set up QEMU
6677
uses: docker/setup-qemu-action@v3
@@ -78,9 +89,11 @@ jobs:
7889
set: |
7990
*.platform=linux/${{ steps.compute_platform.outputs.platform }}
8091
*.cache-to=type=gha,mode=max
92+
*.cache-from=type=registry,ref=pgduckdb/pgduckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ steps.compute_platform.outputs.branch_tag }}-latest
93+
*.cache-from=type=registry,ref=ghcr.io/duckdb/pg_duckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ steps.compute_platform.outputs.branch_tag }}-latest
8194
*.cache-from=type=gha
82-
postgres.tags=pgduckdb/pgduckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ github.sha }}
83-
postgres.tags=pgduckdb/pgduckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ steps.compute_platform.outputs.branch_tag }}-latest
95+
postgres.tags=ghcr.io/duckdb/pg_duckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ github.sha }}
96+
postgres.tags=ghcr.io/duckdb/pg_duckdb:${{ matrix.postgres }}-${{ steps.compute_platform.outputs.platform }}-${{ steps.compute_platform.outputs.branch_tag }}-latest
8497
8598
docker_merge:
8699
name: Merge Docker image for Postgres ${{ matrix.postgres }}

0 commit comments

Comments
 (0)