diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f2de89a82..be9c9a72d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: @@ -36,14 +40,15 @@ 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: | @@ -51,8 +56,7 @@ jobs: -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