Skip to content

Commit

Permalink
Tell actions core getInput() to enforce that required inputs are supp…
Browse files Browse the repository at this point in the history
…lied.
  • Loading branch information
QuintinWillison committed Sep 26, 2022
1 parent 59e5d89 commit 9cce54d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (typeof githubRef !== 'string') {
process.exit(1);
}

const githubToken = core.getInput('githubToken');
const githubToken = core.getInput('githubToken', {required: true});
const octokit = getOctokit(githubToken);

const githubEvent = JSON.parse(fs.readFileSync(githubEventPath, 'utf8'));
Expand Down Expand Up @@ -54,7 +54,7 @@ const createRef = (githubRef: string) => {
const ref = createRef(githubRef)

const s3BucketName = 'sdk.ably.com';
const sourcePath = path.resolve(core.getInput('sourcePath'));
const sourcePath = path.resolve(core.getInput('sourcePath', {required: true}));

// Optional artifactName:
// - The getInput() method calls trim() for us by default (trimWhitespace: true)
Expand Down

0 comments on commit 9cce54d

Please sign in to comment.