From e7f53743837d197482f04161e69380753ba9275c Mon Sep 17 00:00:00 2001 From: Sthope Date: Mon, 28 Aug 2023 19:18:31 +0200 Subject: [PATCH] Update .drone.yml --- .drone.yml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.drone.yml b/.drone.yml index a69f065..63172ad 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,16 +5,28 @@ trigger: release: true steps: - # - name: checkout - # image: plugins/git - # settings: - # repo: https://github.com/insignia-live/setup-assistant-release.git - + - name: checkout + image: plugins/git + settings: + repo: https://github.com/insignia-live/setup-assistant-release.git + - name: run - image: node:14 + image: alpine:3.13 commands: - - npm install axios - - node tools/check_version.js + - apk add --no-cache curl jq + - | + latestReleaseTag=$(curl -s "https://api.github.com/repos/insignia-live/setup-assistant-release/releases/latest" | jq -r '.tag_name') + targetReleaseTag="2023-02-13-1223" # Replace with your target release tag + + if [[ "$latestReleaseTag" > "$targetReleaseTag" ]]; then + echo "This pipeline is run because the new release is newer than the one I have." + elif [[ "$latestReleaseTag" = "$targetReleaseTag" ]]; then + echo "The release tag is the same as the target tag." + echo "Running testing step..." + exit 0 # Trigger the testing step + else + echo "The new release is older than the one I have." + fi when: status: - success @@ -25,7 +37,3 @@ steps: image: alpine commands: - echo "test" - when: - status: - - success - - changed \ No newline at end of file