Skip to content

Commit a1319b6

Browse files
committed
ci(workflows): fix cannot read property 'tag' of undefined
1 parent a877949 commit a1319b6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/continuous-deployment.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ jobs:
3636
uses: actions/github-script@v4
3737
with:
3838
script: |
39-
let tag = context.payload.inputs.tag
40-
41-
if (!tag) {
39+
let tag
40+
41+
if (context.payload.inputs) tag = context.payload.inputs.tag
42+
if (context.payload.pull_request) {
4243
tag = context.payload.pull_request.head.ref.split('release/')[1]
4344
}
4445

0 commit comments

Comments
 (0)