ci: trigger notify only in scheduled workflows (#1671)

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2023-04-17 17:30:56 +02:00 committed by GitHub
parent 3cb6ab04f1
commit e335421dd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 3 deletions

View File

@ -102,7 +102,10 @@ jobs:
gcpServiceAccount: "constellation-iam-e2e@constellation-331613.iam.gserviceaccount.com"
- name: Notify about failure
if: failure() && github.ref == 'refs/heads/main'
if: |
failure() &&
github.ref == 'refs/heads/main' &&
github.event == 'schedule'
continue-on-error: true
uses: ./.github/actions/notify_failure
with:

View File

@ -225,7 +225,10 @@ jobs:
gcpServiceAccount: "constellation-iam-e2e@constellation-331613.iam.gserviceaccount.com"
- name: Notify about failure
if: failure() && github.ref == 'refs/heads/main'
if: |
failure() &&
github.ref == 'refs/heads/main' &&
github.event == 'schedule'
continue-on-error: true
uses: ./.github/actions/notify_failure
with:
@ -254,3 +257,4 @@ jobs:
cloudProvider: ${{ matrix.cloudProvider }}
workerNodesCount: 2
controlNodesCount: 3
scheduled: ${{ github.event == 'schedule' }}

View File

@ -37,6 +37,11 @@ on:
description: Microservice version to target for the upgrade, empty for target's default version.
type: string
required: false
scheduled:
description: Don't set this when triggering manually.
type: boolean
default: false
required: false
workflow_call:
inputs:
cloudProvider:
@ -72,6 +77,11 @@ on:
description: Kubernetes version to target for the upgrade, empty for target's default version.
type: string
required: false
scheduled:
description: Whether this is a scheduled run.
type: boolean
default: false
required: false
jobs:
e2e-upgrade:
@ -187,7 +197,11 @@ jobs:
gcpServiceAccount: "constellation-iam-e2e@constellation-331613.iam.gserviceaccount.com"
- name: Notify about failure
if: failure() && github.ref == 'refs/heads/main'
if: |
failure() &&
github.ref == 'refs/heads/main' &&
github.event == 'workflow_call' &&
inputs.scheduled == 'true'
continue-on-error: true
uses: ./.github/actions/notify_failure
with: