Skip to content

Commit 4ce2b4f

Browse files
committed
chore: fix string handling logic
1 parent 63c0222 commit 4ce2b4f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/dockerhub-release-matrix.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ jobs:
7474

7575
- name: Generate common-nix.vars.pkr.hcl
7676
run: |
77-
PG_VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres${{ matrix.version }}"]' ansible/vars.yml)
77+
# If version contains orioledb-, handle it differently
78+
if [[ "${{ matrix.version }}" == *"orioledb-"* ]]; then
79+
PG_VERSION=$(nix run nixpkgs#yq -- '.postgres_release.postgresorioledb-17' ansible/vars.yml)
80+
else
81+
PG_VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres${{ matrix.version }}"]' ansible/vars.yml)
82+
fi
7883
PG_VERSION=$(echo $PG_VERSION | tr -d '"') # Remove any surrounding quotes
7984
echo 'postgres-version = "'$PG_VERSION'"' > common-nix.vars.pkr.hcl
8085
echo "" >> common-nix.vars.pkr.hcl
@@ -121,7 +126,7 @@ jobs:
121126
fi
122127
123128
# Get version differently based on version type
124-
if [[ "$version" == "orioledb-17" ]]; then
129+
if [[ "$version" == *"orioledb-"* ]]; then
125130
PG_VERSION=$(nix run nixpkgs#yq -- '.postgres_release.postgresorioledb-17' ansible/vars.yml)
126131
else
127132
PG_VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres'$version'"]' ansible/vars.yml)

0 commit comments

Comments
 (0)