+5
-2
@@ -55,17 +55,18 @@ steps:
|
|||||||
# Neuestes Tag vom Upstream Repo ermitteln
|
# 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}')
|
- 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 "Neuestes Tag ist $LATEST_TAG"
|
||||||
- echo -n "$LATEST_TAG" > .latest_tag
|
|
||||||
# Prüfen, ob dieses Tag bereits in der Registry existiert
|
# 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")
|
- 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
|
if [ "$HTTP_CODE" = "200" ]; then
|
||||||
echo "Version $LATEST_TAG existiert bereits. Überspringe Build."
|
echo "Version $LATEST_TAG existiert bereits. Überspringe Build."
|
||||||
echo "SKIP" > .build_mode
|
echo "SKIP" > .build_mode
|
||||||
|
echo -n "$LATEST_TAG" > .latest_tag
|
||||||
else
|
else
|
||||||
echo "Version $LATEST_TAG existiert noch nicht. Starte Build."
|
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 .
|
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
|
fi
|
||||||
|
|
||||||
- name: build-frontend
|
- name: build-frontend
|
||||||
@@ -122,6 +123,8 @@ steps:
|
|||||||
✅ Woodpecker FreeBSD Build erfolgreich!
|
✅ Woodpecker FreeBSD Build erfolgreich!
|
||||||
when:
|
when:
|
||||||
status: [ success ]
|
status: [ success ]
|
||||||
|
event:
|
||||||
|
exclude: [ cron ]
|
||||||
|
|
||||||
- name: notify-failed
|
- name: notify-failed
|
||||||
image: spotlightkid/drone-matrixchat-notify
|
image: spotlightkid/drone-matrixchat-notify
|
||||||
|
|||||||
Reference in New Issue
Block a user