Skip to content

Commit b079b59

Browse files
committed
test: use postgres release version for docker tag
1 parent 5c8032c commit b079b59

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
POSTGRES_PASSWORD: password
2424
steps:
2525
- uses: actions/checkout@v3
26+
- id: settings
27+
# Remove spaces and quotes to get the raw version string
28+
run: sed -r 's/(\s|\")+//g' common-nix.vars.pkr.hcl >> $GITHUB_OUTPUT
29+
2630
- id: args
2731
uses: mikefarah/yq@master
2832
with:
@@ -39,20 +43,19 @@ jobs:
3943
target: production
4044
build-args: |
4145
${{ steps.args.outputs.result }}
42-
tags: supabase/postgres:latest
46+
tags: supabase/postgres:${{ steps.settings.outputs.postgres_version }}
4347
cache-from: |
44-
type=gha,scope=${{ github.ref_name }}-latest-${{ matrix.arch }}
45-
type=gha,scope=${{ github.base_ref }}-latest-${{ matrix.arch }}
46-
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-latest-${{ matrix.arch }}
48+
type=gha,scope=${{ github.ref_name }}-${{ steps.settings.outputs.postgres_version }}-${{ matrix.arch }}
49+
type=gha,scope=${{ github.base_ref }}-${{ steps.settings.outputs.postgres_version }}-${{ matrix.arch }}
50+
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-${{ steps.settings.outputs.postgres_version }}-${{ matrix.arch }}
4751

4852
- name: Start Postgres
4953
run: |
5054
docker run --rm --pull=never \
5155
-e POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }} \
5256
-p ${{ env.POSTGRES_PORT }}:5432 \
5357
--name supabase_postgres \
54-
-d supabase/postgres:latest
55-
58+
-d supabase/postgres:${{ steps.settings.outputs.postgres_version }}
5659
- name: Install psql
5760
run: |
5861
sudo apt update

0 commit comments

Comments
 (0)