From 2c63e7ace1b1a388d044976d7924c60f4fe58b8b Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Wed, 18 Dec 2024 14:38:52 -0500 Subject: [PATCH] chore: use data from previous step --- .../workflows/dockerhub-release-matrix.yml | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/dockerhub-release-matrix.yml b/.github/workflows/dockerhub-release-matrix.yml index d36f3a5e8..701d34941 100644 --- a/.github/workflows/dockerhub-release-matrix.yml +++ b/.github/workflows/dockerhub-release-matrix.yml @@ -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: @@ -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 '