Skip to content

Commit ce2ff2a

Browse files
committed
fix: pg client
1 parent a01a927 commit ce2ff2a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ jobs:
4747
- name: Set PostgreSQL version environment variable
4848
run: echo "POSTGRES_MAJOR_VERSION=${{ matrix.postgres_version }}" >> $GITHUB_ENV
4949

50+
- name: Strip quotes from pg major and set env var
51+
run: |
52+
stripped_version=$(echo ${{ matrix.postgres_version }} | sed 's/^"\(.*\)"$/\1/')
53+
echo "PGMAJOR=$stripped_version" >> $GITHUB_ENV
54+
5055
- name: Generate common-nix.vars.pkr.hcl
5156
run: |
5257
PG_VERSION=$(sudo nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml)
@@ -66,10 +71,6 @@ jobs:
6671
echo "result<<EOF" >> $GITHUB_OUTPUT
6772
echo "$ARGS" >> $GITHUB_OUTPUT
6873
echo "EOF" >> $GITHUB_OUTPUT
69-
- name: Strip quotes from pg major and set env var
70-
run: |
71-
stripped_version=$(echo ${{ matrix.postgres_version }} | sed 's/^"\(.*\)"$/\1/')
72-
echo "PGMAJOR=$stripped_version" >> $GITHUB_ENV
7374
7475
- run: docker context create builders
7576
- uses: docker/setup-buildx-action@v3
@@ -99,7 +100,7 @@ jobs:
99100
- name: Install psql
100101
run: |
101102
sudo apt update
102-
sudo apt install -y --no-install-recommends postgresql-client
103+
sudo apt install -y --no-install-recommends postgresql-client-{{ env.PGMAJOR }}
103104
104105
- name: Install pg_prove
105106
run: sudo cpan -T TAP::Parser::SourceHandler::pgTAP

0 commit comments

Comments
 (0)