Skip to content

Commit

Permalink
fix: check if ref_name is a tag for detecting the image_tag
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Oct 16, 2023
1 parent 46f43f5 commit 63d43a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 63d43a4

Please sign in to comment.