Accept PAT as input and default to typically usable value
This commit is contained in:
parent
affa18ef97
commit
d5e4f508ae
2 changed files with 6 additions and 1 deletions
|
@ -30,6 +30,10 @@ inputs:
|
|||
repository:
|
||||
description: 'Repository to make releases against, in <owner>/<repo> format'
|
||||
required: false
|
||||
token:
|
||||
description: 'Authorized secret GitHub Personal Access Token. Defaults to github.token'
|
||||
required: false
|
||||
default: ${{ github.token }}
|
||||
env:
|
||||
'GITHUB_TOKEN': 'As provided by Github Actions'
|
||||
outputs:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { getInput } from "@actions/core";
|
||||
import * as glob from "glob";
|
||||
import { lstatSync, readFileSync } from "fs";
|
||||
|
||||
|
@ -40,7 +41,7 @@ export const parseInputFiles = (files: string): string[] => {
|
|||
|
||||
export const parseConfig = (env: Env): Config => {
|
||||
return {
|
||||
github_token: env.GITHUB_TOKEN || "",
|
||||
github_token: getInput("token") || env.GITHUB_TOKEN || "",
|
||||
github_ref: env.GITHUB_REF || "",
|
||||
github_repository: env.INPUT_REPOSITORY || env.GITHUB_REPOSITORY || "",
|
||||
input_name: env.INPUT_NAME,
|
||||
|
|
Loading…
Reference in a new issue