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 Nov 7, 2023
1 parent fefef36 commit fb613f3
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
Expand Up @@ -93,6 +93,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 Down Expand Up @@ -120,7 +121,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
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 fb613f3

Please sign in to comment.