Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action: get latest tag by github api #1468

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ env:
CARGO_TERM_COLOR: always
IMAGE: wordpress
TAG: 6.1.1
NYDUS_STABLE_VERSION: v2.2.3
NYDUS_STABLE_VERSION_EXPORT: v2_2_3

jobs:
contrib-build:
Expand Down Expand Up @@ -151,8 +149,10 @@ jobs:
- name: Prepare Older Binaries
id: prepare-binaries
run: |
versions=(v0.1.0 ${{env.NYDUS_STABLE_VERSION}})
version_archs=(v0.1.0-x86_64 ${{env.NYDUS_STABLE_VERSION}}-linux-amd64)
export NYDUS_STABLE_VERSION=$(curl https://api.github.com/repos/Dragonflyoss/nydus/releases/latest | jq -r '.tag_name')

versions=(v0.1.0 ${NYDUS_STABLE_VERSION})
version_archs=(v0.1.0-x86_64 ${NYDUS_STABLE_VERSION}-linux-amd64)
for i in ${!versions[@]}; do
version=${versions[$i]}
version_arch=${version_archs[$i]}
Expand All @@ -177,8 +177,11 @@ jobs:
sudo install -D -m 755 contrib/nydusify/cmd/nydusify /usr/bin/nydus-latest
sudo install -D -m 755 target/release/nydusd target/release/nydus-image /usr/bin/nydus-latest

versions=(v0.1.0 ${{env.NYDUS_STABLE_VERSION}} latest)
version_exports=(v0_1_0 ${{env.NYDUS_STABLE_VERSION_EXPORT}} latest)
export NYDUS_STABLE_VERSION=$(curl https://api.github.com/repos/Dragonflyoss/nydus/releases/latest | jq -r '.tag_name')
export NYDUS_STABLE_VERSION_EXPORT="${NYDUS_STABLE_VERSION//./_}"

versions=(v0.1.0 ${NYDUS_STABLE_VERSION} latest)
version_exports=(v0_1_0 ${NYDUS_STABLE_VERSION_EXPORT} latest)
for i in ${!version_exports[@]}; do
version=${versions[$i]}
version_export=${version_exports[$i]}
Expand Down