Skip to content

Commit c430a75

Browse files
Merge pull request #7 from weierophinney/hotfix/fix-tag-discovery
Strip refs/tags prefix from GITHUB_REF in workflows
2 parents 71ee62d + e9b4808 commit c430a75

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/build-and-push-containers.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ jobs:
1313
- name: Compile tag list
1414
id: tags
1515
run: |
16+
TAG=${GITHUB_REF/refs\/tags\//}
1617
PREFIX=ghrc.io/laminas/laminas-ci-matrix
17-
MAJOR="${PREFIX}:$(echo ${GITHUB_REF} | cut -d. -f1)"
18-
MINOR="${MAJOR}.$(echo ${GITHUB_REF} | cut -d. -f2)"
19-
PATCH="${PREFIX}:${GITHUB_REF}"
18+
MAJOR="${PREFIX}:$(echo ${TAG} | cut -d. -f1)"
19+
MINOR="${MAJOR}.$(echo ${TAG} | cut -d. -f2)"
20+
PATCH="${PREFIX}:${TAG}"
2021
echo "::set-output name=tags::${MAJOR}%0A${MINOR}%0A${PATCH}"
2122
2223
release-container:

.github/workflows/create-additional-action-tags.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
- name: Compile tag list
1414
id: tags
1515
run: |
16-
MAJOR="v$(echo ${GITHUB_REF} | cut -d. -f1)"
16+
TAG=${GITHUB_REF/refs\/tags\//}
17+
MAJOR="v$(echo ${TAG} | cut -d. -f1)"
1718
MINOR="${MAJOR}.$(echo ${GITHUB_REF} | cut -d. -f2)"
1819
echo "::set-output name=tags::${MAJOR}%0A${MINOR}"
1920
@@ -29,6 +30,7 @@ jobs:
2930
ORIGINAL_TAG: ${{ github.ref }}
3031
TAGS: ${{ needs.tags.outputs.tags }}
3132
run: |
33+
ORIGINAL_TAG=${ORIGINAL_TAG/refs\/tags\//}
3234
for TAG in ${TAGS};do
3335
echo "Creating and pushing ${TAG}"
3436
git tag -f ${TAG} ${ORIGINAL_TAG}

0 commit comments

Comments
 (0)