Skip to content

Commit e529e95

Browse files
veksenclaude
andcommitted
fix: use postgres-version input consistently in action.yaml
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 22102cf commit e529e95

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

action.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ runs:
6161
uses: actions/cache@v4
6262
id: pg-client-cache
6363
with:
64-
path: /usr/lib/postgresql
65-
key: pg-client-${{ runner.os }}-18
64+
path: /usr/lib/postgresql/${{ inputs.postgres-version }}
65+
key: pg-client-${{ runner.os }}-${{ inputs.postgres-version }}
6666

6767
- name: Install postgresql-client
6868
shell: bash
@@ -72,16 +72,15 @@ runs:
7272
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /usr/share/keyrings/postgresql.gpg
7373
echo "deb [signed-by=/usr/share/keyrings/postgresql.gpg] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
7474
sudo apt-get update
75-
sudo apt-get install -y postgresql-client-18 || sudo apt-get install -y postgresql-client-17
75+
sudo apt-get install -y postgresql-client-${{ inputs.postgres-version }}
7676
7777
- name: Start PostgreSQL
7878
shell: bash
7979
run: |
8080
PORT=$(shuf -i 10000-65000 -n 1)
8181
echo "PG_PORT=$PORT" >> $GITHUB_ENV
82-
PG_CLIENT_VERSION=$(ls /usr/lib/postgresql | sort -rn | head -1)
83-
echo "PG_DUMP_BINARY=/usr/lib/postgresql/${PG_CLIENT_VERSION}/bin/pg_dump" >> $GITHUB_ENV
84-
echo "PG_RESTORE_BINARY=/usr/lib/postgresql/${PG_CLIENT_VERSION}/bin/pg_restore" >> $GITHUB_ENV
82+
echo "PG_DUMP_BINARY=/usr/lib/postgresql/${{ inputs.postgres-version }}/bin/pg_dump" >> $GITHUB_ENV
83+
echo "PG_RESTORE_BINARY=/usr/lib/postgresql/${{ inputs.postgres-version }}/bin/pg_restore" >> $GITHUB_ENV
8584
docker run -d \
8685
--name query-doctor-postgres \
8786
-p $PORT:5432 \

0 commit comments

Comments
 (0)