Skip to content

Commit e10fb50

Browse files
authored
Skip running int test workflow for dependabot PRs [v8] (#3542)
1 parent 5ef762e commit e10fb50

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/tests-integration.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ on:
3333
jobs:
3434
get-sha:
3535
runs-on: ubuntu-latest
36+
if: ${{ github.actor != 'dependabot[bot]' }}
3637
outputs:
3738
gitRef: ${{steps.calculate.outputs.ref}}
3839
steps:
@@ -85,7 +86,7 @@ jobs:
8586
- create-cf-env
8687
outputs:
8788
env-name: ${{ steps.set-name.outputs.env-name }}
88-
if: always()
89+
if: ${{ always() && github.actor != 'dependabot[bot]' }}
8990
steps:
9091
- name: set env name
9192
id: set-name
@@ -101,7 +102,11 @@ jobs:
101102
needs:
102103
- get-sha
103104
- set-env-name
104-
if: ${{ always() && (github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' || inputs.workflow == 'run-integration-tests-cf-env') }}
105+
if: >
106+
${{ always() &&
107+
needs.set-env-name.result == 'success' &&
108+
(github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' ||
109+
inputs.workflow == 'run-integration-tests-cf-env') }}
105110
uses: ./.github/workflows/tests-integration-reusable.yml
106111
with:
107112
name: Integration
@@ -115,7 +120,11 @@ jobs:
115120
needs:
116121
- get-sha
117122
- set-env-name
118-
if: ${{ always() && (github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' || inputs.workflow == 'run-integration-tests-cf-env-with-client-creds') }}
123+
if: >
124+
${{ always() &&
125+
needs.set-env-name.result == 'success' &&
126+
(github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' ||
127+
inputs.workflow == 'run-integration-tests-cf-env-with-client-creds') }}
119128
uses: ./.github/workflows/tests-integration-reusable.yml
120129
with:
121130
name: Integration client creds
@@ -126,7 +135,7 @@ jobs:
126135

127136
delete-env:
128137
name: Unclaim environment
129-
if: ${{ always() && inputs.env-name == '' }}
138+
if: ${{ always() && inputs.env-name == '' && needs.set-env-name.result == 'success' }}
130139
needs:
131140
- set-env-name
132141
- run-integration-tests-cf-env

0 commit comments

Comments
 (0)