You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when using actions/checkout, specifying a ref that does not exist causes the action to fail. In some workflows, it would be more efficient if, when the specified branch does not exist, a new branch could be automatically created from the default branch.
Proposed Solution
I propose adding an auto-create option to actions/checkout. This option would allow the action to:
Checkout the default branch (e.g., main) if the specified ref does not exist.
Create a new branch with the specified ref from the default branch.
This behavior would only occur when the auto-create option is enabled, keeping the current behavior unchanged by default.
Problem
Currently, when using
actions/checkout
, specifying aref
that does not exist causes the action to fail. In some workflows, it would be more efficient if, when the specified branch does not exist, a new branch could be automatically created from the default branch.Proposed Solution
I propose adding an
auto-create
option toactions/checkout
. This option would allow the action to:main
) if the specifiedref
does not exist.ref
from the default branch.This behavior would only occur when the
auto-create
option is enabled, keeping the current behavior unchanged by default.Example YAML
The text was updated successfully, but these errors were encountered: