Skip to content

Commit f56b092

Browse files
committed
fix: fail to add secret GITHUB_TOKEN
1 parent b88e1cd commit f56b092

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

__tests__/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test('input', () => {
1010

1111
const inp = getInputs()
1212

13-
expect(inp.GithubToken).toMatch('')
13+
expect(inp.Token).toMatch('')
1414
expect(inp.GistID).toMatch('test_gist_id')
1515
expect(inp.GistFileName).toMatch('test_gist_file_name')
1616
expect(inp.FilePath).toMatch('test_file_path')

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ branding:
55
icon: 'upload-cloud'
66
color: 'blue'
77
inputs:
8-
github_token:
8+
token:
99
required: true
10-
description: 'Set a generated GITHUB_TOKEN for updating gist.'
10+
description: 'Set a generated TOKEN for updating gist.'
1111
gist_id:
1212
required: true
1313
description: 'Set id of the gist to be updated.'

src/inputs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as core from '@actions/core'
22

33
export interface Inputs {
4-
readonly GithubToken: string
4+
readonly Token: string
55
readonly GistID: string
66
readonly GistFileName?: string
77
readonly FilePath: string
@@ -17,7 +17,7 @@ export const showInputs = (inp: Inputs): void => {
1717

1818
export const getInputs = (): Inputs => {
1919
const inp: Inputs = {
20-
GithubToken: core.getInput('github_token'),
20+
Token: core.getInput('token'),
2121
GistID: core.getInput('gist_id'),
2222
GistFileName: core.getInput('gist_file_name'),
2323
FilePath: core.getInput('file_path')

src/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const run = async (): Promise<void> => {
1616
core.endGroup()
1717

1818
core.startGroup('Deploy to gist')
19-
const octokit = github.getOctokit(inp.GithubToken)
19+
const octokit = github.getOctokit(inp.Token)
2020
const fileName = inp.GistFileName ? inp.GistFileName : path.basename(filePath)
2121
octokit.gists.update({
2222
gist_id: inp.GistID,

0 commit comments

Comments
 (0)