Skip to content

Commit 41f47d5

Browse files
Update environment branch protection rules documentation (#57383)
Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com>
1 parent 089283f commit 41f47d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/actions/reference/workflows-and-actions/deployments-and-environments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Use deployment branches and tags to restrict which branches and tags can deploy
5656
5757
* **Selected branches and tags:** Only branches and tags that match your specified name patterns can deploy to the environment.
5858

59-
If you specify `releases/*` as a deployment branch or tag rule, only a branch or tag whose name begins with `releases/` can deploy to the environment. (Wildcard characters will not match `/`. To match branches or tags that begin with `release/` and contain an additional single slash, use `release/*/*`.) If you add `main` as a branch rule, a branch named `main` can also deploy to the environment. For more information about syntax options for deployment branches, see the [Ruby `File.fnmatch` documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch).
59+
The deployment branch or tag rule is matched against the `GITHUB_REF` of the workflow run. For values of `GITHUB_REF` for each workflow trigger, see [AUTOTITLE](/actions/using-workflows/events-that-trigger-workflows). If you specify `releases/*` as a deployment branch or tag rule, only a `GITHUB_REF` whose name begins with `releases/` can deploy to the environment. Adding another branch rule for `refs/pull/*/merge` would also allow workflows triggered by `pull_request` events to deploy to the environment. Wildcard characters will not match `/`, to match branches or tags that begin with `release/` and contain an additional single slash, use `release/*/*`. For more information about syntax options for deployment branches, see the [Ruby `File.fnmatch` documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch).
6060

6161
{% data reusables.actions.branch-and-tag-deployment-rules-configuration %}
6262

0 commit comments

Comments
 (0)