Skip to content

Commit c648b32

Browse files
committed
GitHub Actions: Derive secondary dist version from archive filename
[Why] Using the `fetch-gh-release-asset` action outputs work fine for our official releases, but it does not for our alphas published to `rabbitmq/server-packages` because the filenames use another version compared to the GitHub release. [How] Always derive the version from the archive filename. This is safe regardless of what the GitHub release states.
1 parent 1aa7cee commit c648b32

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/test-make-target.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,16 @@ jobs:
6565
- name: MIXED CLUSTERS - SETUP SECONDARY_DIST
6666
if: inputs.mixed_clusters
6767
run: |
68+
ls -l rabbitmq-server-generic-unix-*.tar.xz*
69+
70+
archive_name=$(echo rabbitmq-server-generic-unix-*.tar.xz)
71+
archive_version=$(echo $archive_name | sed -E -e 's/^rabbitmq-server-generic-unix-//' -e 's/\.tar\.xz$//')
72+
6873
gpg --import rabbitmq-release-signing-key.asc
69-
gpg --verify rabbitmq-server-generic-unix-*.asc rabbitmq-server-generic-unix-*.tar.xz
70-
tar xf rabbitmq-server-generic-unix-*.tar.xz
74+
gpg --verify $archive_name.asc $archive_name
75+
tar xf $archive_name
7176
72-
echo "SECONDARY_DIST=${GITHUB_WORKSPACE}/rabbitmq_server-`echo -n ${{ steps.fetch_secondary_dist.outputs.version }} | sed s/v//`" >> $GITHUB_ENV
77+
echo "SECONDARY_DIST=${GITHUB_WORKSPACE}/rabbitmq_server-$archive_version" >> $GITHUB_ENV
7378
7479
- name: SETUP DOTNET (rabbit)
7580
uses: actions/setup-dotnet@v4

0 commit comments

Comments
 (0)