Skip to content

Commit

Permalink
chore: make sure env var can be appended in all contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
samrose committed Dec 18, 2024
1 parent 084b300 commit 126e974
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/dockerhub-release-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,29 +87,28 @@ jobs:
id: image
run: |
if [[ "${{ matrix.arch }}" == "arm64" ]]; then
sudo nix run nixpkgs#nushell -- -c '
pg_version=$(sudo nix run nixpkgs#nushell -- -c '
let version = "${{ matrix.postgres.version }}"
let release_key = if ($version | str contains "orioledb") {
$"postgresorioledb-17"
} else {
$"postgres($version)"
}
let pg_version = (open ansible/vars.yml | get postgres_release | get $release_key | str trim)
$"pg_version=supabase/postgres:($pg_version)" | save --append $env.GITHUB_OUTPUT
'
open ansible/vars.yml | get postgres_release | get $release_key | str trim
')
echo "pg_version=supabase/postgres:$pg_version" >> $GITHUB_OUTPUT
else
nix run nixpkgs#nushell -- -c '
pg_version=$(nix run nixpkgs#nushell -- -c '
let version = "${{ matrix.postgres.version }}"
let release_key = if ($version | str contains "orioledb") {
$"postgresorioledb-17"
} else {
$"postgres($version)"
}
let pg_version = (open ansible/vars.yml | get postgres_release | get $release_key | str trim)
$"pg_version=supabase/postgres:($pg_version)" | save --append $env.GITHUB_OUTPUT
'
open ansible/vars.yml | get postgres_release | get $release_key | str trim
')
echo "pg_version=supabase/postgres:$pg_version" >> $GITHUB_OUTPUT
fi
- id: build
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit 126e974

Please sign in to comment.