diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1f94f2da3..feb77060c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -40,9 +40,9 @@ jobs: run: | IFS=',' read -ra APP_LISTS <<< "$APP_LISTS" for APP in "${APP_LISTS[@]}"; do - TAG=$(grep 'LABEL version' "apps/$APP/Dockerfile" | cut -d'"' -f2) + TAG=$(grep 'LABEL version' "apps/$APP/Dockerfile" | cut -d'"' -f2 | xargs) echo $TAG - TAGS=$(echo $TAG | awk -F. '{for(i=1;i<=NF;i++){printf (i==1?"":",")"%s",substr($0,1,index($0,$i"."$((i+1)))-1)}}' | sed 's/,$//') + IFS='.' read -ra PARTS <<< "$TAG"; TAGS=""; for i in "${!PARTS[@]}"; do if [ "$i" -eq 0 ]; then TAGS+="${PARTS[$i]}"; else TAGS+=",${TAGS}.${PARTS[$i]}"; fi; done; echo $TAGS echo $TAGS echo "Building and pushing Docker image for $APP with tags: $TAGS" echo "TAGS=$TAGS" >> $GITHUB_ENV diff --git a/apps/discuz/Dockerfile b/apps/discuz/Dockerfile index 69c5f4c48..d086e1224 100644 --- a/apps/discuz/Dockerfile +++ b/apps/discuz/Dockerfile @@ -1,4 +1,4 @@ -# update time: 202312070817 +# update time: 202312070824 FROM joomla:php7.4-apache