File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 2727 "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
2828 exit 1
2929 fi
30+ EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
3031 echo "**** External version: ${EXT_RELEASE} ****"
3132 echo "**** Retrieving last pushed version ****"
3233 image="linuxserver/bookstack"
Original file line number Diff line number Diff line change @@ -450,6 +450,13 @@ pipeline {
450450 environment name : ' EXIT_STATUS' , value : ' '
451451 }
452452 steps {
453+ sh ''' #! /bin/bash
454+ echo "Packages were updated. Cleaning up the image and exiting."
455+ if [ "${MULTIARCH}" == "true" ]; then
456+ docker rmi ${IMAGE}:amd64-${META_TAG}
457+ else
458+ docker rmi ${IMAGE}:${META_TAG}
459+ fi'''
453460 script{
454461 env. EXIT_STATUS = ' ABORTED'
455462 }
@@ -467,6 +474,13 @@ pipeline {
467474 }
468475 }
469476 steps {
477+ sh ''' #! /bin/bash
478+ echo "There are no package updates. Cleaning up the image and exiting."
479+ if [ "${MULTIARCH}" == "true" ]; then
480+ docker rmi ${IMAGE}:amd64-${META_TAG}
481+ else
482+ docker rmi ${IMAGE}:${META_TAG}
483+ fi'''
470484 script{
471485 env. EXIT_STATUS = ' ABORTED'
472486 }
@@ -556,7 +570,7 @@ pipeline {
556570 '''
557571 }
558572 sh ''' #! /bin/bash
559- for DELETEIMAGE in "${GITHUBIMAGE}" "{GITLABIMAGE}" "${IMAGE}"; do
573+ for DELETEIMAGE in "${GITHUBIMAGE}" "$ {GITLABIMAGE}" "${IMAGE}"; do
560574 docker rmi \
561575 ${DELETEIMAGE}:${META_TAG} \
562576 ${DELETEIMAGE}:${EXT_RELEASE_TAG} \
You can’t perform that action at this time.
0 commit comments