diff --git a/action-src/main.ts b/action-src/main.ts index 0940e34a8..1bb88d904 100755 --- a/action-src/main.ts +++ b/action-src/main.ts @@ -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'); @@ -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) { diff --git a/action.yml b/action.yml index ea50b29d0..cc4189899 100755 --- a/action.yml +++ b/action.yml @@ -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