Skip to content

Commit

Permalink
Merge pull request #89 from dokku/fix-semver-detection
Browse files Browse the repository at this point in the history
Check if ref_name is a tag for detecting the image_tag
  • Loading branch information
josegonzalez committed Oct 16, 2023
2 parents 46f43f5 + a48c81f commit afb9685
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit afb9685

Please sign in to comment.