This commit is contained in:
parent
3346113562
commit
e7f5374383
30
.drone.yml
30
.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
|
Loading…
x
Reference in New Issue
Block a user