File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -7,27 +7,28 @@ import { getInput } from './input'
7
7
export const run = async ( ) : Promise < void > => {
8
8
const input = getInput ( )
9
9
10
+ const workSpace = process . env . GITHUB_WORKSPACE !
11
+ const filePath = path . join ( workSpace , input . filePath )
12
+ const fileName = input . gistFileName ?? path . basename ( filePath )
13
+
10
14
startGroup ( 'Dump inputs' )
11
15
info ( `\
12
16
[INFO] GistId: ${ input . gistId } ${
13
17
input . gistDescription === undefined
14
18
? ''
15
19
: `\n[INFO] GistDescription: ${ input . gistDescription } `
16
20
}
17
- [INFO] GistFileName: ${ input . gistFileName ?? 'No Change' }
21
+ [INFO] GistFileName: ${ fileName }
18
22
[INFO] FilePath: ${ input . filePath } ` )
19
23
endGroup ( )
20
24
21
25
startGroup ( 'Read file content' )
22
- const workSpace = process . env . GITHUB_WORKSPACE !
23
- const filePath = path . join ( workSpace , input . filePath )
24
26
const content = await fs . readFile ( filePath , 'utf-8' )
25
27
info ( `[INFO] Done with file "${ filePath } "` )
26
28
endGroup ( )
27
29
28
30
startGroup ( 'Deploy to gist' )
29
31
const octokit = getOctokit ( input . token )
30
- const fileName = input . gistFileName ?? path . basename ( filePath )
31
32
await octokit . rest . gists . update ( {
32
33
gist_id : input . gistId ,
33
34
description : input . gistDescription ,
You can’t perform that action at this time.
0 commit comments