Skip to content

Strip refs/tags prefix from GITHUB_REF in workflows #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

weierophinney
Copy link
Member

Evidently $GITHUB_REF is in the form refs/tags/{TAG_NAME} for a release.

Evidently `$GITHUB_REF` is in the form `refs/tags/{TAG_NAME}` for a release.

Signed-off-by: Matthew Weier O'Phinney <[email protected]>
@weierophinney weierophinney added this to the 1.2.2 milestone Mar 3, 2021
@weierophinney weierophinney added the Bug Something isn't working label Mar 3, 2021
@weierophinney weierophinney merged commit c430a75 into laminas:1.2.x Mar 3, 2021
@weierophinney weierophinney deleted the hotfix/fix-tag-discovery branch March 3, 2021 18:23
@@ -13,10 +13,11 @@ jobs:
- name: Compile tag list
id: tags
run: |
TAG=${GITHUB_REF/refs\/tags\//}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use strip prefix in such cases;

➔ echo TAG=${GITHUB_REF/refs\/tags\//}
TAG=123
➔ echo TAG=${GITHUB_REF#refs/tags/}
TAG=123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants