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

fix: skip lint workflow check #90

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
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