Skip to content

Commit 72f26aa

Browse files
committed
🤞
1 parent e2064ac commit 72f26aa

File tree

2 files changed

+12
-24
lines changed

2 files changed

+12
-24
lines changed

‎.github/workflows/ami-release.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,24 @@ jobs:
5050
endpoint: builders
5151
- uses: docker/build-push-action@v5
5252
with:
53-
load: true
5453
build-args: |
5554
${{ steps.args.outputs.result }}
5655
target: extensions
5756
tags: supabase/postgres:extensions
5857
platforms: linux/${{ matrix.arch }}
58+
outputs: type=tar,dest=/tmp/extensions.tar
5959
cache-from: type=gha,scope=${{ github.ref_name }}-latest-${{ matrix.arch }}
6060
# No need to export extensions cache because latest depends on it
6161
- name: Extract built packages
6262
run: |
63-
mkdir -p /tmp/extensions ansible/files/extensions
64-
docker save supabase/postgres:extensions | tar xv -C /tmp/extensions
65-
for layer in /tmp/extensions/*/layer.tar; do
66-
tar xvf "$layer" -C ansible/files/extensions --strip-components 1
67-
done
63+
mkdir -p ansible/files/extensions
64+
tar xvf /tmp/extensions.tar -C ansible/files/extensions --strip-components 1
6865
6966
- id: version
7067
run: echo "${{ steps.args.outputs.result }}" | grep "postgresql" >> "$GITHUB_OUTPUT"
7168
- name: Build Postgres deb
7269
uses: docker/build-push-action@v5
7370
with:
74-
load: true
7571
file: docker/Dockerfile
7672
target: pg-deb
7773
build-args: |
@@ -82,15 +78,13 @@ jobs:
8278
CPPFLAGS=-mcpu=${{ matrix.mcpu }}
8379
tags: supabase/postgres:deb
8480
platforms: linux/${{ matrix.arch }}
81+
outputs: type=tar,dest=/tmp/pg-deb.tar
8582
cache-from: type=gha,scope=${{ github.ref_name }}-deb
8683
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-deb
8784
- name: Extract Postgres deb
8885
run: |
89-
mkdir -p /tmp/build ansible/files/postgres
90-
docker save supabase/postgres:deb | tar xv -C /tmp/build
91-
for layer in /tmp/build/*/layer.tar; do
92-
tar xvf "$layer" -C ansible/files/postgres --strip-components 1
93-
done
86+
mkdir -p ansible/files/postgres
87+
tar xvf /tmp/pg-deb.tar -C ansible/files/postgres --strip-components 1
9488
9589
- name: Build AMI
9690
run: |

‎.github/workflows/testinfra.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ jobs:
7272

7373
- uses: docker/build-push-action@v5
7474
with:
75-
load: true
7675
build-args: |
7776
${{ steps.args.outputs.result }}
7877
target: extensions
7978
tags: supabase/postgres:extensions
8079
platforms: linux/${{ matrix.arch }}
80+
outputs: type=tar,dest=/tmp/extensions.tar
8181
cache-from: |
8282
type=gha,scope=${{ github.ref_name }}-extensions
8383
type=gha,scope=${{ github.base_ref }}-extensions
@@ -86,19 +86,15 @@ jobs:
8686

8787
- name: Extract built packages
8888
run: |
89-
mkdir -p /tmp/extensions ansible/files/extensions
90-
docker save supabase/postgres:extensions | tar xv -C /tmp/extensions
91-
for layer in /tmp/extensions/*/layer.tar; do
92-
tar xvf "$layer" -C ansible/files/extensions --strip-components 1
93-
done
89+
mkdir -p ansible/files/extensions
90+
tar xvf /tmp/extensions.tar -C ansible/files/extensions --strip-components 1
9491
9592
- id: version
9693
run: echo "${{ steps.args.outputs.result }}" | grep "postgresql" >> "$GITHUB_OUTPUT"
9794

9895
- name: Build Postgres deb
9996
uses: docker/build-push-action@v5
10097
with:
101-
load: true
10298
file: docker/Dockerfile
10399
target: pg-deb
104100
build-args: |
@@ -109,6 +105,7 @@ jobs:
109105
CPPFLAGS=-mcpu=${{ matrix.mcpu }}
110106
tags: supabase/postgres:deb
111107
platforms: linux/${{ matrix.arch }}
108+
outputs: type=tar,dest=/tmp/pg-deb.tar
112109
cache-from: |
113110
type=gha,scope=${{ github.ref_name }}-deb
114111
type=gha,scope=${{ github.base_ref }}-deb
@@ -117,11 +114,8 @@ jobs:
117114

118115
- name: Extract Postgres deb
119116
run: |
120-
mkdir -p /tmp/build ansible/files/postgres
121-
docker save supabase/postgres:deb | tar xv -C /tmp/build
122-
for layer in /tmp/build/*/layer.tar; do
123-
tar xvf "$layer" -C ansible/files/postgres --strip-components 1
124-
done
117+
mkdir -p ansible/files/postgres
118+
tar xvf /tmp/pg-deb.tar -C ansible/files/postgres --strip-components 1
125119
126120
# Packer doesn't support skipping registering the AMI for the ebssurrogate
127121
# builder, so we register an AMI with a fixed name and run tests on an

0 commit comments

Comments
 (0)