Skip to content

Commit 9f48a1d

Browse files
authored
feat: allow overriding pg_upgrade scripts publish target version (#1066)
1 parent de45815 commit 9f48a1d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/publish-nix-pgupgrade-scripts.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- '.github/workflows/publish-pgupgrade-scripts.yml'
1010
- 'common-nix.vars.pkr.hcl'
1111
workflow_dispatch:
12+
inputs:
13+
postgresVersion:
14+
description: 'Optional. Postgres version to publish against, i.e. 15.1.1.78'
15+
required: false
1216

1317
permissions:
1418
id-token: write
@@ -25,6 +29,9 @@ jobs:
2529
id: process_release_version
2630
run: |
2731
VERSION=$(grep 'postgres-version' common-nix.vars.pkr.hcl | sed -e 's/postgres-version = "\(.*\)"/\1/g')
32+
if [[ "${{ inputs.postgresVersion }}" != "" ]]; then
33+
VERSION=${{ inputs.postgresVersion }}
34+
fi
2835
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
2936
3037
- name: Create a tarball containing pg_upgrade scripts

.github/workflows/publish-pgupgrade-scripts.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
- '.github/workflows/publish-pgupgrade-scripts.yml'
99
- 'common.vars.pkr.hcl'
1010
workflow_dispatch:
11+
inputs:
12+
postgresVersion:
13+
description: 'Optional. Postgres version to publish against, i.e. 15.1.1.78'
14+
required: false
1115

1216
permissions:
1317
id-token: write
@@ -24,6 +28,9 @@ jobs:
2428
id: process_release_version
2529
run: |
2630
VERSION=$(grep 'postgres-version' common.vars.pkr.hcl | sed -e 's/postgres-version = "\(.*\)"/\1/g')
31+
if [[ "${{ inputs.postgresVersion }}" != "" ]]; then
32+
VERSION=${{ inputs.postgresVersion }}
33+
fi
2734
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
2835
2936
- name: Create a tarball containing pg_upgrade scripts

0 commit comments

Comments
 (0)