Skip to content

Commit

Permalink
chore: use data from previous step
Browse files Browse the repository at this point in the history
  • Loading branch information
samrose committed Dec 18, 2024
1 parent ea2bc3b commit 2c63e7a
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/dockerhub-release-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ jobs:
docker buildx imagetools create -t ${{ env.pg_version }} \
${{ env.pg_version }}_amd64 \
${{ env.pg_version }}_arm64
get_publish_version:
needs: [prepare, merge_manifest]
strategy:
Expand All @@ -169,22 +170,18 @@ jobs:
matrix: ${{ steps.get_versions.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- name: Get versions
- name: Get version
id: get_versions
run: |
nu -c '
let versions = ${{ fromJson(needs.prepare.outputs.matrix_config).include | select(.version) | to array }}
let versions_array = ($versions | each { |ver|
let version = $ver.version
let release_key = if ($version | str contains "orioledb") {
$"postgres($version | str replace "-" "")"
} else {
$"postgres($version)"
}
let pg_version = (open ansible/vars.yml | get postgres_release | get $release_key | str trim)
{version: $pg_version}
})
let matrix = {include: $versions_array}
let version = "${{ matrix.version }}"
let release_key = if ($version | str contains "orioledb") {
$"postgres($version | str replace "-" "")"
} else {
$"postgres($version)"
}
let pg_version = (open ansible/vars.yml | get postgres_release | get $release_key | str trim)
let matrix = {include: [{version: $pg_version}]}
$"matrix=($matrix | to json)" | save --append $env.GITHUB_OUTPUT
'
Expand Down

0 comments on commit 2c63e7a

Please sign in to comment.