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/wireguard"
Original file line number Diff line number Diff line change @@ -440,6 +440,13 @@ pipeline {
440440 environment name : ' EXIT_STATUS' , value : ' '
441441 }
442442 steps {
443+ sh ''' #! /bin/bash
444+ echo "Packages were updated. Cleaning up the image and exiting."
445+ if [ "${MULTIARCH}" == "true" ]; then
446+ docker rmi ${IMAGE}:amd64-${META_TAG}
447+ else
448+ docker rmi ${IMAGE}:${META_TAG}
449+ fi'''
443450 script{
444451 env. EXIT_STATUS = ' ABORTED'
445452 }
@@ -457,6 +464,13 @@ pipeline {
457464 }
458465 }
459466 steps {
467+ sh ''' #! /bin/bash
468+ echo "There are no package updates. Cleaning up the image and exiting."
469+ if [ "${MULTIARCH}" == "true" ]; then
470+ docker rmi ${IMAGE}:amd64-${META_TAG}
471+ else
472+ docker rmi ${IMAGE}:${META_TAG}
473+ fi'''
460474 script{
461475 env. EXIT_STATUS = ' ABORTED'
462476 }
@@ -546,7 +560,7 @@ pipeline {
546560 '''
547561 }
548562 sh ''' #! /bin/bash
549- for DELETEIMAGE in "${GITHUBIMAGE}" "{GITLABIMAGE}" "${IMAGE}"; do
563+ for DELETEIMAGE in "${GITHUBIMAGE}" "$ {GITLABIMAGE}" "${IMAGE}"; do
550564 docker rmi \
551565 ${DELETEIMAGE}:${META_TAG} \
552566 ${DELETEIMAGE}:${EXT_RELEASE_TAG} \
You can’t perform that action at this time.
0 commit comments