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 :
@@ -36,23 +40,23 @@ jobs:
36
40
with :
37
41
load : true
38
42
context : .
43
+ file : " Dockerfile-156"
39
44
target : production
40
45
build-args : |
41
46
${{ steps.args.outputs.result }}
42
- tags : supabase/postgres:latest
47
+ tags : supabase/postgres:${{ steps.settings.outputs.postgres-version }}
43
48
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 }}
49
+ type=gha,scope=${{ github.ref_name }}-${{ steps.settings.outputs.postgres-version }} -${{ matrix.arch }}
50
+ type=gha,scope=${{ github.base_ref }}-${{ steps.settings.outputs.postgres-version }} -${{ matrix.arch }}
51
+ cache-to : type=gha,mode=max,scope=${{ github.ref_name }}-${{ steps.settings.outputs.postgres-version }} -${{ matrix.arch }}
47
52
48
53
- name : Start Postgres
49
54
run : |
50
55
docker run --rm --pull=never \
51
56
-e POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }} \
52
57
-p ${{ env.POSTGRES_PORT }}:5432 \
53
58
--name supabase_postgres \
54
- -d supabase/postgres:latest
55
-
59
+ -d supabase/postgres:${{ steps.settings.outputs.postgres-version }}
56
60
- name : Install psql
57
61
run : |
58
62
sudo apt update
0 commit comments