Skip to content

Commit

Permalink
Merge pull request #4892 from werf/ci_disable_notification_for_draft_prs
Browse files Browse the repository at this point in the history
ci: disable slack notification for draft pull requests
  • Loading branch information
alexey-igrychev committed Sep 5, 2022
2 parents 1e10e85 + a140911 commit ae8c259
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docs_deploy_pr.yml
Expand Up @@ -16,7 +16,9 @@ jobs:
kubeContext: dev

notify:
if: failure()
if: |
(github.event_name == 'pull_request' && github.event.pull_request.draft == false && failure()) ||
(github.event_name != 'pull_request' && failure())
needs: deploy-test
uses: ./.github/workflows/_notification.yml
secrets:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docs_validate.yml
Expand Up @@ -79,7 +79,9 @@ jobs:
WERF_REPO: "ghcr.io/${{ github.repository_owner }}/werfio"

notify:
if: failure()
if: |
(github.event_name == 'pull_request' && github.event.pull_request.draft == false && failure()) ||
(github.event_name != 'pull_request' && failure())
needs:
- check_cli_and_readme_partials
- check_broken_links
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_main.yml
Expand Up @@ -70,7 +70,9 @@ jobs:
secrets: inherit

notify:
if: (github.event_name == 'pull_request' && failure()) || (github.event_name != 'pull_request' && always())
if: |
(github.event_name == 'pull_request' && github.event.pull_request.draft == false && failure()) ||
(github.event_name != 'pull_request' && always())
needs:
- unlabel
- integration_main
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_pr.yml
Expand Up @@ -55,7 +55,9 @@ jobs:
forceSkip: ${{ github.event_name == 'pull_request' && needs.detect-changes.outputs.workflow_proceed == 'false' }}

notify:
if: (github.event_name != 'pull_request' || needs.detect-changes.outputs.workflow_proceed == 'true') && failure()
if: |
(github.event_name == 'pull_request' && github.event.pull_request.draft == false && failure()) ||
(github.event_name != 'pull_request' && failure())
needs:
- lint
- unit
Expand Down

0 comments on commit ae8c259

Please sign in to comment.