This commit is contained in:
@@ -55,17 +55,18 @@ steps:
|
||||
# Neuestes Tag vom Upstream Repo ermitteln
|
||||
- LATEST_TAG=$(git ls-remote --tags --refs --sort='v:refname' https://github.com/woodpecker-ci/woodpecker.git | tail -n1 | awk -F/ '{print $3}')
|
||||
- echo "Neuestes Tag ist $LATEST_TAG"
|
||||
- echo -n "$LATEST_TAG" > .latest_tag
|
||||
# Prüfen, ob dieses Tag bereits in der Registry existiert
|
||||
- HTTP_CODE=$(curl -o /dev/null -s -w "%{http_code}" -I -u $API_USER:$API_TOKEN "https://git.familie-berner.de/api/packages/Open/generic/woodpecker-freebsd/$LATEST_TAG/woodpecker-server")
|
||||
- |
|
||||
if [ "$HTTP_CODE" = "200" ]; then
|
||||
echo "Version $LATEST_TAG existiert bereits. Überspringe Build."
|
||||
echo "SKIP" > .build_mode
|
||||
echo -n "$LATEST_TAG" > .latest_tag
|
||||
else
|
||||
echo "Version $LATEST_TAG existiert noch nicht. Starte Build."
|
||||
echo "BUILD" > .build_mode
|
||||
git clone --depth 1 --branch "$LATEST_TAG" https://github.com/woodpecker-ci/woodpecker.git .
|
||||
echo "BUILD" > .build_mode
|
||||
echo -n "$LATEST_TAG" > .latest_tag
|
||||
fi
|
||||
|
||||
- name: build-frontend
|
||||
@@ -122,6 +123,8 @@ steps:
|
||||
✅ Woodpecker FreeBSD Build erfolgreich!
|
||||
when:
|
||||
status: [ success ]
|
||||
event:
|
||||
exclude: [ cron ]
|
||||
|
||||
- name: notify-failed
|
||||
image: spotlightkid/drone-matrixchat-notify
|
||||
|
||||
Reference in New Issue
Block a user