Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to override commit sha on github action #829

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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