Skip to content

Commit 54210c7

Browse files
authored
Skip running int test workflow for dependabot PRs [main] (cloudfoundry#3543)
1 parent 1414b7c commit 54210c7

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
@@ -34,6 +34,7 @@ jobs:
3434

3535
get-sha:
3636
runs-on: ubuntu-latest
37+
if: ${{ github.actor != 'dependabot[bot]' }}
3738
outputs:
3839
gitRef: ${{steps.calculate.outputs.ref}}
3940
steps:
@@ -86,7 +87,7 @@ jobs:
8687
- create-cf-env
8788
outputs:
8889
env-name: ${{ steps.set-name.outputs.env-name }}
89-
if: always()
90+
if: ${{ always() && github.actor != 'dependabot[bot]' }}
9091
steps:
9192
- name: set env name
9293
id: set-name
@@ -102,7 +103,11 @@ jobs:
102103
needs:
103104
- get-sha
104105
- set-env-name
105-
if: ${{ always() && (github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' || inputs.workflow == 'run-integration-tests-cf-env') }}
106+
if: >
107+
${{ always() &&
108+
needs.set-env-name.result == 'success' &&
109+
(github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' ||
110+
inputs.workflow == 'run-integration-tests-cf-env') }}
106111
uses: ./.github/workflows/tests-integration-reusable.yml
107112
with:
108113
name: Integration
@@ -116,7 +121,11 @@ jobs:
116121
needs:
117122
- get-sha
118123
- set-env-name
119-
if: ${{ always() && (github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' || inputs.workflow == 'run-integration-tests-cf-env-with-client-creds') }}
124+
if: >
125+
${{ always() &&
126+
needs.set-env-name.result == 'success' &&
127+
(github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' ||
128+
inputs.workflow == 'run-integration-tests-cf-env-with-client-creds') }}
120129
uses: ./.github/workflows/tests-integration-reusable.yml
121130
with:
122131
name: Integration client creds
@@ -127,7 +136,7 @@ jobs:
127136

128137
delete-env:
129138
name: Unclaim environment
130-
if: ${{ always() && inputs.env-name == '' }}
139+
if: ${{ always() && inputs.env-name == '' && needs.set-env-name.result == 'success' }}
131140
needs:
132141
- set-env-name
133142
- run-integration-tests-cf-env

0 commit comments

Comments
 (0)