Skip to content

Commit b2afc66

Browse files
authored
Merge pull request #8 from fpringle/cicd
Only run `haskell.yml` when PR is not a draft
2 parents b86b731 + c90b45f commit b2afc66

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/haskell.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@ on:
55
branches: [ "main" ]
66
pull_request:
77
branches: [ "main" ]
8+
types: [ opened, synchronize, reopened, ready_for_review ]
89

910
permissions:
1011
contents: read
1112

1213
jobs:
1314
generate-matrix:
1415
name: "Generate matrix from cabal"
16+
if: ( ( github.event_name == 'push' )
17+
|| ( github.event_name == 'pull_request'
18+
&& github.event.pull_request.draft == false
19+
)
20+
)
1521
outputs:
1622
matrix: ${{ steps.set-matrix.outputs.matrix }}
1723
runs-on: ubuntu-latest
@@ -25,7 +31,11 @@ jobs:
2531
version: 0.1.7.1
2632

2733
test:
28-
34+
if: ( ( github.event_name == 'push' )
35+
|| ( github.event_name == 'pull_request'
36+
&& github.event.pull_request.draft == false
37+
)
38+
)
2939
name: ${{ matrix.ghc }} on ${{ matrix.os }}
3040
needs: generate-matrix
3141
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)