From 179df9e5961821eca35761a54a074527eda5a80d Mon Sep 17 00:00:00 2001 From: Gary Lockett Date: Mon, 19 Dec 2022 14:35:31 +0000 Subject: [PATCH 1/4] set-output deprecation changed how multilines are handled Signed-off-by: Gary Lockett --- .github/workflows/create-additional-action-tags.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-additional-action-tags.yml b/.github/workflows/create-additional-action-tags.yml index 662c9b32..2b778b24 100644 --- a/.github/workflows/create-additional-action-tags.yml +++ b/.github/workflows/create-additional-action-tags.yml @@ -16,7 +16,9 @@ jobs: TAG=${GITHUB_REF/refs\/tags\//} MAJOR="v$(echo ${TAG} | cut -d. -f1)" MINOR="${MAJOR}.$(echo ${GITHUB_REF} | cut -d. -f2)" - echo "tags=${MAJOR}%0A${MINOR}" >> $GITHUB_OUTPUT + echo "tags=${MAJOR}<> $GITHUB_OUTPUT + echo "${MINOR}" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT update-tags: runs-on: ubuntu-latest From f5a4e78b2c9ce17ea81d64ccc625052fd0754d7c Mon Sep 17 00:00:00 2001 From: Gary Lockett Date: Mon, 19 Dec 2022 15:10:28 +0000 Subject: [PATCH 2/4] the variable name doesn't need an assignment on the same line when multiline Signed-off-by: Gary Lockett --- .github/workflows/create-additional-action-tags.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-additional-action-tags.yml b/.github/workflows/create-additional-action-tags.yml index 2b778b24..f8d456d3 100644 --- a/.github/workflows/create-additional-action-tags.yml +++ b/.github/workflows/create-additional-action-tags.yml @@ -16,7 +16,8 @@ jobs: TAG=${GITHUB_REF/refs\/tags\//} MAJOR="v$(echo ${TAG} | cut -d. -f1)" MINOR="${MAJOR}.$(echo ${GITHUB_REF} | cut -d. -f2)" - echo "tags=${MAJOR}<> $GITHUB_OUTPUT + echo "tags<> $GITHUB_OUTPUT + echo "${MAJOR}" >> $GITHUB_OUTPUT echo "${MINOR}" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT From f8e69b9ea199ad269e6717ce6869b1b7d159b009 Mon Sep 17 00:00:00 2001 From: Gary Lockett Date: Mon, 19 Dec 2022 15:20:56 +0000 Subject: [PATCH 3/4] use a randomised delimiter to prevent injection from other jobs Signed-off-by: Gary Lockett --- .github/workflows/create-additional-action-tags.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-additional-action-tags.yml b/.github/workflows/create-additional-action-tags.yml index f8d456d3..525266b4 100644 --- a/.github/workflows/create-additional-action-tags.yml +++ b/.github/workflows/create-additional-action-tags.yml @@ -16,10 +16,11 @@ jobs: TAG=${GITHUB_REF/refs\/tags\//} MAJOR="v$(echo ${TAG} | cut -d. -f1)" MINOR="${MAJOR}.$(echo ${GITHUB_REF} | cut -d. -f2)" - echo "tags<> $GITHUB_OUTPUT + EOF="$(uuid)" + echo "tags<<${EOF}" >> $GITHUB_OUTPUT echo "${MAJOR}" >> $GITHUB_OUTPUT echo "${MINOR}" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + echo "${EOF}" >> $GITHUB_OUTPUT update-tags: runs-on: ubuntu-latest From a18c588629c72bb7bb24ebcaee83cba84226d943 Mon Sep 17 00:00:00 2001 From: Gary Lockett Date: Mon, 19 Dec 2022 15:29:11 +0000 Subject: [PATCH 4/4] use uuidgen to generate unique id Signed-off-by: Gary Lockett --- .github/workflows/create-additional-action-tags.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-additional-action-tags.yml b/.github/workflows/create-additional-action-tags.yml index 525266b4..0ee502fd 100644 --- a/.github/workflows/create-additional-action-tags.yml +++ b/.github/workflows/create-additional-action-tags.yml @@ -16,7 +16,7 @@ jobs: TAG=${GITHUB_REF/refs\/tags\//} MAJOR="v$(echo ${TAG} | cut -d. -f1)" MINOR="${MAJOR}.$(echo ${GITHUB_REF} | cut -d. -f2)" - EOF="$(uuid)" + EOF="$(uuidgen)" echo "tags<<${EOF}" >> $GITHUB_OUTPUT echo "${MAJOR}" >> $GITHUB_OUTPUT echo "${MINOR}" >> $GITHUB_OUTPUT