Skip to content

Commit 1a7cbef

Browse files
committed
changing the workflow to not trigger on draft prs or just any commits - only commits to non draft prs
1 parent 3bc5a48 commit 1a7cbef

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ name: "CI/CD pull request"
33
# The total recommended execution time for the "CI/CD Pull Request" workflow is around 20 minutes.
44

55
on:
6-
push:
7-
branches:
8-
- "**"
96
pull_request:
10-
types: [opened, reopened]
7+
types: [opened, synchronize, reopened]
118

129
jobs:
1310
metadata:
11+
if: github.event.pull_request.draft == false
1412
name: "Set CI/CD metadata"
1513
runs-on: ubuntu-latest
1614
timeout-minutes: 1
@@ -69,6 +67,7 @@ jobs:
6967
make list-variables
7068
commit-stage: # Recommended maximum execution time is 2 minutes
7169
name: "Commit stage"
70+
if: github.event.pull_request.draft == false
7271
needs: [metadata]
7372
uses: ./.github/workflows/stage-1-commit.yaml
7473
with:
@@ -82,6 +81,7 @@ jobs:
8281
secrets: inherit
8382
test-stage: # Recommended maximum execution time is 5 minutes
8483
name: "Test stage"
84+
if: github.event.pull_request.draft == false
8585
needs: [metadata, commit-stage]
8686
uses: ./.github/workflows/stage-2-test.yaml
8787
with:

0 commit comments

Comments
 (0)