23
23
POSTGRES_PASSWORD : password
24
24
steps :
25
25
- 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
+
26
30
- id : args
27
31
uses : mikefarah/yq@master
28
32
with :
@@ -39,20 +43,19 @@ jobs:
39
43
target : production
40
44
build-args : |
41
45
${{ steps.args.outputs.result }}
42
- tags : supabase/postgres:latest
46
+ tags : supabase/postgres:${{ steps.settings.outputs.postgres_version }}
43
47
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 }}
47
51
48
52
- name : Start Postgres
49
53
run : |
50
54
docker run --rm --pull=never \
51
55
-e POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }} \
52
56
-p ${{ env.POSTGRES_PORT }}:5432 \
53
57
--name supabase_postgres \
54
- -d supabase/postgres:latest
55
-
58
+ -d supabase/postgres:${{ steps.settings.outputs.postgres_version }}
56
59
- name : Install psql
57
60
run : |
58
61
sudo apt update
0 commit comments