Skip to content

Commit

Permalink
test: use postgres release version for docker tag (#1099)
Browse files Browse the repository at this point in the history
* test: use postgres release version for docker tag

* fix: ref the var correct

* fix: use correct Dockerfile

---------

Co-authored-by: Sam Rose <[email protected]>
  • Loading branch information
samrose and Sam Rose committed Aug 7, 2024
1 parent 5c8032c commit 2a2d157
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
POSTGRES_PASSWORD: password
steps:
- uses: actions/checkout@v3
- id: settings
# Remove spaces and quotes to get the raw version string
run: sed -r 's/(\s|\")+//g' common-nix.vars.pkr.hcl >> $GITHUB_OUTPUT

- id: args
uses: mikefarah/yq@master
with:
Expand All @@ -36,23 +40,23 @@ jobs:
with:
load: true
context: .
file: "Dockerfile-156"
target: production
build-args: |
${{ steps.args.outputs.result }}
tags: supabase/postgres:latest
tags: supabase/postgres:${{ steps.settings.outputs.postgres-version }}
cache-from: |
type=gha,scope=${{ github.ref_name }}-latest-${{ matrix.arch }}
type=gha,scope=${{ github.base_ref }}-latest-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-latest-${{ matrix.arch }}
type=gha,scope=${{ github.ref_name }}-${{ steps.settings.outputs.postgres-version }}-${{ matrix.arch }}
type=gha,scope=${{ github.base_ref }}-${{ steps.settings.outputs.postgres-version }}-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-${{ steps.settings.outputs.postgres-version }}-${{ matrix.arch }}

- name: Start Postgres
run: |
docker run --rm --pull=never \
-e POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }} \
-p ${{ env.POSTGRES_PORT }}:5432 \
--name supabase_postgres \
-d supabase/postgres:latest
-d supabase/postgres:${{ steps.settings.outputs.postgres-version }}
- name: Install psql
run: |
sudo apt update
Expand Down

0 comments on commit 2a2d157

Please sign in to comment.