Skip to content

Commit eb3130a

Browse files
authored
update CD workflow trigger (#18)
1 parent bd47289 commit eb3130a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/cd.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,23 @@
22
name: CD
33

44
on:
5-
push:
5+
pull_request:
6+
types:
7+
- closed
68
branches:
79
- main
810
paths:
911
- "src/**"
10-
workflow_dispatch:
1112

1213
jobs:
1314
version-type:
15+
name: Get version type
16+
if: github.event.pull_request.merged == true
1417
uses: ./.github/workflows/_version_type.yml
1518

1619
version-bump:
1720
name: Version bump
21+
if: github.event.pull_request.merged == true
1822
runs-on: ubuntu-22.04
1923
needs: version-type
2024
outputs:
@@ -85,6 +89,7 @@ jobs:
8589
8690
release:
8791
name: GitHub release
92+
if: github.event.pull_request.merged == true
8893
runs-on: ubuntu-22.04
8994
needs: version-bump
9095
steps:
@@ -102,6 +107,7 @@ jobs:
102107

103108
deploy:
104109
name: Deploy workflow-linter (v2)
110+
if: github.event.pull_request.merged == true
105111
runs-on: ubuntu-22.04
106112
needs: version-bump
107113
steps:

0 commit comments

Comments
 (0)