Commit 5906069 1 parent 675c800 commit 5906069 Copy full SHA for 5906069
File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ inputs:
14
14
outputs :
15
15
stage :
16
16
description : The inferred stage from the branch or PR name
17
+ destroy :
18
+ description : If the serverless stack should be destroyed, defaults to false. True when a pull request is closed.
17
19
runs :
18
20
using : ' node20'
19
21
main : ' dist/main.js'
Original file line number Diff line number Diff line change @@ -45,9 +45,14 @@ export class Action {
45
45
}
46
46
deploymentStage = `${ GITHUB_BASE_REF } -pr-${ branchId } ` ;
47
47
}
48
-
49
48
setOutput ( 'stage' , deploymentStage ) ;
50
49
50
+ let destroy = false ;
51
+ if ( context . eventName === 'pull_request' && context . payload . action === 'closed' ) {
52
+ destroy = true ;
53
+ }
54
+ setOutput ( 'destroy' , destroy ) ;
55
+
51
56
let idToken : string | undefined = undefined ;
52
57
53
58
try {
You can’t perform that action at this time.
0 commit comments