Skip to content

Commit

Permalink
feat: allow overriding pg_upgrade scripts publish target version (#1066)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcnc authored Jul 22, 2024
1 parent de45815 commit 9f48a1d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/publish-nix-pgupgrade-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
- '.github/workflows/publish-pgupgrade-scripts.yml'
- 'common-nix.vars.pkr.hcl'
workflow_dispatch:
inputs:
postgresVersion:
description: 'Optional. Postgres version to publish against, i.e. 15.1.1.78'
required: false

permissions:
id-token: write
Expand All @@ -25,6 +29,9 @@ jobs:
id: process_release_version
run: |
VERSION=$(grep 'postgres-version' common-nix.vars.pkr.hcl | sed -e 's/postgres-version = "\(.*\)"/\1/g')
if [[ "${{ inputs.postgresVersion }}" != "" ]]; then
VERSION=${{ inputs.postgresVersion }}
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Create a tarball containing pg_upgrade scripts
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/publish-pgupgrade-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- '.github/workflows/publish-pgupgrade-scripts.yml'
- 'common.vars.pkr.hcl'
workflow_dispatch:
inputs:
postgresVersion:
description: 'Optional. Postgres version to publish against, i.e. 15.1.1.78'
required: false

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

0 comments on commit 9f48a1d

Please sign in to comment.