nrwl/Nx set SHAs

Derives SHAs for base and head for use in nx affected commands, optionally setting them as env variables for the current job

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
gh-tokenThe GitHub token used to perform git operations${{ github.token }}
main-branch-nameThe name of the main branch in your repo, used as the target of PRs. E.g. main, master etcmain
remoteThe name of the remote to fetch fromorigin
set-environment-variables-for-jobApplies the derived SHAs for base and head as NX_BASE and NX_HEAD environment variables within the current Jobtrue
error-on-no-successful-workflowBy 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.false
fallback-shaFallback SHA to use if no successful workflow run is found.no""
last-successful-eventThe type of event to check for the last successful commit corresponding to that workflow-id, e.g. push, pull_request, release etcpush
working-directoryThe directory where your repository is located.
workflow-idThe ID of the workflow to track or name of the file name. E.g. ci.yml. Defaults to current workflow
use-previous-merge-group-commitWhen using merge-group, use the previous commit in the group as the base SHAtrue
namedescription
baseThe value intended for use with --base or NX_BASE in all subsequent `nx affected` commands within the current workflow
headThe value intended for use with --head or NX_HEAD in all subsequent `nx affected` commands within the current workflow
noPreviousBuildUsed to check if a previous run was found in order to perform additional logic later on in your workflow, the only possible values is the string 'true', otherwise it won't be set