Skip to content
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

Check if ref_name is a tag for detecting the image_tag #89

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
types:
- completed
push:
tags:
tags:
- '*'

concurrency:
Expand All @@ -35,6 +35,10 @@ jobs:
elif [[ '${{ github.event.workflow_run.head_branch }}' == "master" ]]; then
echo -e "\u001b[32mDetected master branch\u001b[0m"
push_enabled=true
elif [[ '${{github.ref_name}}' =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo -e "\u001b[32mDetected semver tag\u001b[0m"
image_tag='${{ github.ref_name }}'
push_enabled=true
else
echo "::warning ::Unable to detect semver tag or master branch"
push_enabled=false
Expand Down