feat: allow non-default target branch deployments via a new input option #361
+312
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About
This pull request does the following:
allow_non_default_target_branch_deployments
as a new input option. This new input option will allow pull requests that are targeting (merging into) a branch other than the default one (oftenmain
) to be deployed. This option is disabled by default as it is potentially unsafe since non-default branches usually lack adequate branch protection rules (or GitHub rulesets).non_default_target_branch_used
as an output variable. This new output will indicate if a pull request is targeting a branch other than the default branch for the merge. If this is the case, then it will be set to"true"
.Usage
If you also wish to disable the security warnings that come with this setting (due to its risky nature) you can also do so with:
related: #341, #340