Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environments on implicit builds have branch source #34005

Closed
1 task done
janbrasna opened this issue Jul 17, 2024 · 2 comments · Fixed by #34095
Closed
1 task done

Environments on implicit builds have branch source #34005

janbrasna opened this issue Jul 17, 2024 · 2 comments · Fixed by #34095
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team help wanted Anyone is welcome to open a pull request to fix this issue

Comments

@janbrasna
Copy link
Contributor

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#creating-an-environment

What part(s) of the article would you like to see updated?

"Running a workflow that references an environment that does not exist will create an environment with the referenced name. The newly created environment will not have any protection rules or secrets configured. Anyone that can edit workflows in the repository can create environments via a workflow file, but only repository admins can configure the environment."

Environments created from running implicit page builds (i.e. from branch/folder source) will have the source branch added as a protection to the environment.

Additional information

It's a nitpick, maybe just too subtle to sort out, i.e. "running a workflow" could mean here that the implicit runs don't really run any explicit workflow etc. — just wanted to bring this into attention, that it bit me a few times when the implicit runs created environments that had some default source protections baked in them from the beginning…

@janbrasna janbrasna added the content This issue or pull request belongs to the Docs Content team label Jul 17, 2024
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Jul 17, 2024
@nguyenalex836 nguyenalex836 added actions This issue or pull request should be reviewed by the docs actions team waiting for review Issue/PR is waiting for a writer's review and removed triage Do not begin working on this issue until triaged by the team labels Jul 18, 2024
@nguyenalex836
Copy link
Contributor

@janbrasna Thanks so much for opening a PR! I'll get this triaged for review ✨

@jc-clark
Copy link
Contributor

Thanks for catching this @janbrasna! I think that in this situation, it would make sense to call out the implicit builds scenario you're referencing.

We could update this paragraph to something like:

Running a workflow that references an environment that does not exist will create an environment with the referenced name. If the environment is created from running implicit page builds (for example, from a branch or folder source), the source branch will be added as a protection rule to the environment. Otherwise, the newly created environment will not have any protection rules or secrets configured. Anyone that can edit workflows in the repository can create environments via a workflow file, but only repository admins can configure the environment.

You or anyone else is welcome to open a PR with this fix. See our contributing guide for more information.

@jc-clark jc-clark added the help wanted Anyone is welcome to open a pull request to fix this issue label Jul 25, 2024
@nguyenalex836 nguyenalex836 removed the waiting for review Issue/PR is waiting for a writer's review label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team help wanted Anyone is welcome to open a pull request to fix this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants