supabase-postgres.git / summary / log / commit / refs
commit 0971aef8c2d900b0a2822e3935fa7a1e6b58e5ee
Author: Bobbie Soedirgo <bobbie@soedirgo.dev>
Date: Thu Jan 25 06:14:46 2024 +0000
fix: docker builders
`docker save` was exporting the image in OCI format - we can't easily
extract the `.deb`s from it.
.github/workflows/ami-release.yml | 18 ++++++------------
.github/workflows/testinfra.yml | 18 ++++++------------
2 files changed, 12 insertions(+), 24 deletions(-)
diff --git a/.github/workflows/ami-release.yml b/.github/workflows/ami-release.yml
index b1d40cb9..f95f56c9 100644
--- a/.github/workflows/ami-release.yml
+++ b/.github/workflows/ami-release.yml
@@ -50,28 +50,24 @@ jobs:
endpoint: builders
- uses: docker/build-push-action@v5
with:
- load: true
build-args: |
${{ steps.args.outputs.result }}
target: extensions
tags: supabase/postgres:extensions
platforms: linux/${{ matrix.arch }}
+ outputs: type=tar,dest=/tmp/extensions.tar
cache-from: type=gha,scope=${{ github.ref_name }}-latest-${{ matrix.arch }}
# No need to export extensions cache because latest depends on it
- name: Extract built packages
run: |
- mkdir -p /tmp/extensions ansible/files/extensions
- docker save supabase/postgres:extensions | tar xv -C /tmp/extensions
- for layer in /tmp/extensions/*/layer.tar; do
- tar xvf "$layer" -C ansible/files/extensions --strip-components 1
- done
+ mkdir -p ansible/files/extensions
+ tar xvf /tmp/extensions.tar -C ansible/files/extensions --strip-components 1
- id: version
run: echo "${{ steps.args.outputs.result }}" | grep "postgresql" >> "$GITHUB_OUTPUT"
- name: Build Postgres deb
uses: docker/build-push-action@v5
with:
- load: true
file: docker/Dockerfile
target: pg-deb
build-args: |
@@ -82,15 +78,13 @@ jobs:
CPPFLAGS=-mcpu=${{ matrix.mcpu }}
tags: supabase/postgres:deb
platforms: linux/${{ matrix.arch }}
+ outputs: type=tar,dest=/tmp/pg-deb.tar
cache-from: type=gha,scope=${{ github.ref_name }}-deb
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-deb
- name: Extract Postgres deb
run: |
- mkdir -p /tmp/build ansible/files/postgres
- docker save supabase/postgres:deb | tar xv -C /tmp/build
- for layer in /tmp/build/*/layer.tar; do
- tar xvf "$layer" -C ansible/files/postgres --strip-components 1
- done
+ mkdir -p ansible/files/postgres
+ tar xvf /tmp/pg-deb.tar -C ansible/files/postgres --strip-components 1
- name: Build AMI
run: |
diff --git a/.github/workflows/testinfra.yml b/.github/workflows/testinfra.yml
index 9fe84e34..46867512 100644
--- a/.github/workflows/testinfra.yml
+++ b/.github/workflows/testinfra.yml
@@ -72,12 +72,12 @@ jobs:
- uses: docker/build-push-action@v5
with:
- load: true
build-args: |
${{ steps.args.outputs.result }}
target: extensions
tags: supabase/postgres:extensions
platforms: linux/${{ matrix.arch }}
+ outputs: type=tar,dest=/tmp/extensions.tar
cache-from: |
type=gha,scope=${{ github.ref_name }}-extensions
type=gha,scope=${{ github.base_ref }}-extensions
@@ -86,11 +86,8 @@ jobs:
- name: Extract built packages
run: |
- mkdir -p /tmp/extensions ansible/files/extensions
- docker save supabase/postgres:extensions | tar xv -C /tmp/extensions
- for layer in /tmp/extensions/*/layer.tar; do
- tar xvf "$layer" -C ansible/files/extensions --strip-components 1
- done
+ mkdir -p ansible/files/extensions
+ tar xvf /tmp/extensions.tar -C ansible/files/extensions --strip-components 1
- id: version
run: echo "${{ steps.args.outputs.result }}" | grep "postgresql" >> "$GITHUB_OUTPUT"
@@ -98,7 +95,6 @@ jobs:
- name: Build Postgres deb
uses: docker/build-push-action@v5
with:
- load: true
file: docker/Dockerfile
target: pg-deb
build-args: |
@@ -109,6 +105,7 @@ jobs:
CPPFLAGS=-mcpu=${{ matrix.mcpu }}
tags: supabase/postgres:deb
platforms: linux/${{ matrix.arch }}
+ outputs: type=tar,dest=/tmp/pg-deb.tar
cache-from: |
type=gha,scope=${{ github.ref_name }}-deb
type=gha,scope=${{ github.base_ref }}-deb
@@ -117,11 +114,8 @@ jobs:
- name: Extract Postgres deb
run: |
- mkdir -p /tmp/build ansible/files/postgres
- docker save supabase/postgres:deb | tar xv -C /tmp/build
- for layer in /tmp/build/*/layer.tar; do
- tar xvf "$layer" -C ansible/files/postgres --strip-components 1
- done
+ mkdir -p ansible/files/postgres
+ tar xvf /tmp/pg-deb.tar -C ansible/files/postgres --strip-components 1
# Packer doesn't support skipping registering the AMI for the ebssurrogate
# builder, so we register an AMI with a fixed name and run tests on an
[parent: 9b9412c0ed1b]