Skip to content

Commit

Permalink
ci: cURL latest release form GH API
Browse files Browse the repository at this point in the history
.. instead of using parent of current git ref

Signed-off-by: Marcel Lauhoff <[email protected]>
(cherry picked from commit 21a3011)
Signed-off-by: Marcel Lauhoff <[email protected]>
  • Loading branch information
Marcel Lauhoff committed Mar 30, 2023
1 parent d918c36 commit 095c323
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,20 @@ jobs:
with:
submodules: true

- name: Install S3cmd
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y s3cmd
sudo apt-get install -y s3cmd curl jq
- name: Run On-Disk Format Test
run: |
NEW_VERSION=${{ github.ref_name }}
OLD_VERSION=$(git describe --abbrev=0 --tags ${{ github.ref_name }}^)
OLD_VERSION_RAW="$(curl -L \
-H 'Accept: application/vnd.github+json' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
'https://api.github.com/repos/aquarist-labs/s3gw/releases/latest' \
| jq -r .name)"
OLD_VERSION="${OLD_VERSION_RAW//[^v0-9.]/}"
VERSION_AFTER_V=$(cut -d "v" -f2 <<< ${{ github.ref_name }})
VERSION_AFTER_RC=$(cut -d "-" -f1 <<< ${VERSION_AFTER_V})
Expand Down

0 comments on commit 095c323

Please sign in to comment.