File tree Expand file tree Collapse file tree 5 files changed +37
-5
lines changed Expand file tree Collapse file tree 5 files changed +37
-5
lines changed Original file line number Diff line number Diff line change 38
38
token : ${{github.token}}
39
39
type : delete
40
40
deployment_id : ${{steps.create.outputs.deployment_id}}
41
+ - uses : ./
42
+ with :
43
+ token : ${{github.token}}
44
+ type : create
45
+ - uses : ./
46
+ with :
47
+ token : ${{github.token}}
48
+ type : delete
49
+ deployment_id : 248141623
50
+ - uses : ./
51
+ with :
52
+ token : ${{github.token}}
53
+ type : delete
54
+ deployment_id : 248139855
55
+ - uses : ./
56
+ with :
57
+ token : ${{github.token}}
58
+ type : delete
59
+ deployment_id : 248137552
Original file line number Diff line number Diff line change @@ -17,6 +17,12 @@ inputs:
17
17
deployment_id :
18
18
required : false
19
19
description : an id for deployment if 'delete' or 'finish' type is used
20
+ status :
21
+ required : false
22
+ description : status for created or finished deployment
23
+ environment :
24
+ required : false
25
+ description : environment to create or delete all deployments in, default to context.ref without prefixes ('refs/heads/', 'deploy-')
20
26
runs :
21
27
using : ' node12'
22
28
main : ' dist/index.js'
Original file line number Diff line number Diff line change @@ -3553,11 +3553,12 @@ function run() {
3553
3553
let environmentUrl;
3554
3554
let deploymentId;
3555
3555
const { actor, ref } = github.context;
3556
- console.log('Context.. ');
3556
+ console.log('### context ### ');
3557
3557
console.log(`actor: ${actor}`);
3558
3558
console.log(`ref: ${ref}`);
3559
+ console.log('\n');
3559
3560
try {
3560
- console.log('Inputs.. ');
3561
+ console.log('### inputs ### ');
3561
3562
token = (_a = getInput('token', { required: true })) !== null && _a !== void 0 ? _a : '';
3562
3563
type = getInput('type', { required: true });
3563
3564
console.log(`type: ${type}`);
@@ -3581,7 +3582,9 @@ function run() {
3581
3582
core.setFailed(`Wrong parameters given: ${JSON.stringify(error, null, 2)}`);
3582
3583
throw error;
3583
3584
}
3585
+ console.log('\n');
3584
3586
const client = new github.GitHub(token, { previews: ['ant-man', 'flash'] });
3587
+ console.log('### run ###');
3585
3588
switch (type) {
3586
3589
case 'create':
3587
3590
try {
Original file line number Diff line number Diff line change @@ -31,12 +31,13 @@ export async function run (): Promise<void> {
31
31
32
32
const { actor, ref } = github . context
33
33
34
- console . log ( 'Context.. ' )
34
+ console . log ( '### context ### ' )
35
35
console . log ( `actor: ${ actor } ` )
36
36
console . log ( `ref: ${ ref } ` )
37
+ console . log ( '\n' )
37
38
38
39
try {
39
- console . log ( 'Inputs.. ' )
40
+ console . log ( '### inputs ### ' )
40
41
token = getInput ( 'token' , { required : true } ) ?? ''
41
42
42
43
type = getInput ( 'type' , { required : true } ) as ActionType
@@ -66,9 +67,12 @@ export async function run (): Promise<void> {
66
67
core . setFailed ( `Wrong parameters given: ${ JSON . stringify ( error , null , 2 ) } ` )
67
68
throw error
68
69
}
70
+ console . log ( '\n' )
69
71
70
72
const client = new github . GitHub ( token , { previews : [ 'ant-man' , 'flash' ] } )
71
73
74
+ console . log ( '### run ###' )
75
+
72
76
switch ( type ) {
73
77
case 'create' :
74
78
try {
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ describe('delete-all', () => {
164
164
} )
165
165
} )
166
166
167
- describe ( 'delete-all ' , ( ) => {
167
+ describe ( 'delete' , ( ) => {
168
168
beforeEach ( ( ) => {
169
169
process . env [ 'GITHUB_REPOSITORY' ] = 'owner/repo'
170
170
You can’t perform that action at this time.
0 commit comments