Skip to content

Commit

Permalink
fix: strip "refs/tags/" prefix from GITHUB_REF when generating contai…
Browse files Browse the repository at this point in the history
…ner tags

Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
  • Loading branch information
weierophinney committed Mar 3, 2021
1 parent 22e38b5 commit 0518d61
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-and-push-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ jobs:
- name: Compile tag list
id: tags
run: |
TAG=${GITHUB_REF/refs\/tags\//}
PREFIX=ghrc.io/laminas/automatic-releases
MAJOR="${PREFIX}:$(echo ${GITHUB_REF} | cut -d. -f1)"
MINOR="${MAJOR}.$(echo ${GITHUB_REF} | cut -d. -f2)"
PATCH="${PREFIX}:${GITHUB_REF}"
MAJOR="${PREFIX}:$(echo ${TAG} | cut -d. -f1)"
MINOR="${MAJOR}.$(echo ${TAG} | cut -d. -f2)"
PATCH="${PREFIX}:${TAG}"
echo "::set-output name=tags::${MAJOR}%0A${MINOR}%0A${PATCH}"
release-container:
Expand Down

0 comments on commit 0518d61

Please sign in to comment.