-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
description: > | ||
Derives SHAs for base and head for use in `nx affected` commands in CI | ||
parameters: | ||
main-branch-name: | ||
type: string | ||
default: main | ||
description: > | ||
The name of the main branch in your repo, used as the target of PRs. E.g. main, master etc. | ||
error-on-no-successful-workflow: | ||
type: boolean | ||
default: false | ||
description: > | ||
By default, if no successful workflow is found on the main branch to determine the SHA, | ||
we will log a warning and use HEAD~1. Enable this option to error and exit instead. | ||
steps: | ||
- run: | ||
environment: | ||
PARAM_MAIN_BRANCH: <<parameters.main-branch-name>> | ||
PARAM_ERROR_ON_NO_SUCCESSFUL_WORKFLOW: <<parameters.error-on-no-successful-workflow>> | ||
name: Derives SHAs for base and head for use in `nx affected` commands | ||
shell: "/bin/bash" | ||
command: echo "I was done" |