From add6f902dcd32e44e3e27644e45c5e38a86a2c63 Mon Sep 17 00:00:00 2001 From: Michael Balsillie Date: Sun, 21 Aug 2022 23:19:54 +1200 Subject: [PATCH] use script instead --- .woodpecker/main.yml | 10 ++-------- check-tag.sh | 11 +++++++++++ 2 files changed, 13 insertions(+), 8 deletions(-) create mode 100755 check-tag.sh diff --git a/.woodpecker/main.yml b/.woodpecker/main.yml index 685d879..f2efd30 100644 --- a/.woodpecker/main.yml +++ b/.woodpecker/main.yml @@ -19,16 +19,10 @@ clone: pipeline: check-tag: - image: code.balsillie.net/containers/debian:11-slim-bash + image: debian:11-slim pull: false commands: - - if [[ $TAG =~ ^v1\...\..rc.$ ]]; then - echo "Tag ${TAG} appears to be a release candidate, terminating build." && exit 1 - elif [[ $TAG =~ ^v1\...\..$ ]]; then - echo "Tag ${TAG} appears to be a release tag, proceeding." && exit 0 - else - echo "Unable to determine nature of tag, terminating build." && exit 1 - fi + - /bin/bash check-tag.sh clone-source: image: docker:git commands: diff --git a/check-tag.sh b/check-tag.sh new file mode 100755 index 0000000..1daecb4 --- /dev/null +++ b/check-tag.sh @@ -0,0 +1,11 @@ +#!/bin/bash +if [[ $TAG =~ ^v1\...\..rc.$ ]]; then + echo "Tag ${TAG} appears to be a release candidate, terminating build." + exit 1 +elif [[ $TAG =~ ^v1\...\..$ ]]; then + echo "Tag ${TAG} appears to be a release tag, proceeding." + exit 0 +else + echo "Unable to determine nature of tag, terminating build." + exit 1 +fi \ No newline at end of file