Skip to content

Commit

Permalink
enable to override commit sha on github action
Browse files Browse the repository at this point in the history
  • Loading branch information
nobuhikosawai authored and thafryer committed Oct 4, 2023
1 parent d617a9c commit 9b16499
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion action-src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ async function run() {
const autoAcceptChanges = getInput('autoAcceptChanges');
const branchName = getInput('branchName');
const buildScriptName = getInput('buildScriptName');
const commitSha = getInput('commitSha');
const debug = getInput('debug');
const diagnostics = getInput('diagnostics');
const dryRun = getInput('dryRun');
Expand All @@ -128,7 +129,7 @@ async function run() {
const junitReport = getInput('junitReport');

process.env.CHROMATIC_ACTION = 'true';
process.env.CHROMATIC_SHA = sha;
process.env.CHROMATIC_SHA = commitSha || sha;
process.env.CHROMATIC_BRANCH = branchName || branch;
process.env.CHROMATIC_SLUG = repositorySlug || slug;
if (mergeCommit) {
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ inputs:
buildScriptName:
description: 'The npm script that builds your Storybook [build-storybook]'
required: false
commitSha:
description: 'Override the commit SHA'
required: false
debug:
description: 'Output verbose debugging information'
required: false
Expand Down

0 comments on commit 9b16499

Please sign in to comment.