Skip to content

Commit

Permalink
Merge pull request #90 from dokku/fix-semver-detection
Browse files Browse the repository at this point in the history
fix: skip lint workflow check
  • Loading branch information
josegonzalez committed Oct 16, 2023
2 parents afb9685 + 0468702 commit 2d34013
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
run: |
image_tag=latest
push_enabled=false
is_tagged=false
if [[ '${{ github.event.workflow_run.head_branch }}' =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo -e "\u001b[32mDetected semver tag\u001b[0m"
image_tag='${{ github.event.workflow_run.head_branch }}'
Expand All @@ -39,16 +40,21 @@ jobs:
echo -e "\u001b[32mDetected semver tag\u001b[0m"
image_tag='${{ github.ref_name }}'
push_enabled=true
is_tagged=true
else
echo "::warning ::Unable to detect semver tag or master branch"
push_enabled=false
fi
if [[ '${{ github.event.workflow_run.conclusion }}' != 'success' ]]; then
echo "::warning ::Unable to detect successful lint workflow_run conclusion"
push_enabled=false
if [[ "$is_tagged" == "true" ]]; then
echo -e "\u001b[32mSkipping lint workflow_run check\u001b[0m"
else
echo -e "\u001b[32mDetected success lint workflow_run conclusion\u001b[0m"
if [[ '${{ github.event.workflow_run.conclusion }}' != 'success' ]]; then
echo "::warning ::Unable to detect successful lint workflow_run conclusion"
push_enabled=false
else
echo -e "\u001b[32mDetected success lint workflow_run conclusion\u001b[0m"
fi
fi
echo "push-enabled=${push_enabled}" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 2d34013

Please sign in to comment.