-
Notifications
You must be signed in to change notification settings - Fork 925
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
Use alternative environment for release build bump #2855
Conversation
By using a separate environment, we can postpone the bump in the version repository by adding a requirement for approval. Dev version will use default (empty string) environment which doesn't have any constraints.
if: ${{ github.repository == 'home-assistant/operating-system' }} | ||
environment: "${{ github.event_name == 'release' && needs.prepare.outputs.channel || '' }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats the reason behind providing a ""
environment here, instead of just using needs.prepare.outputs.channel
like on core https://github.com/home-assistant/core/blob/dev/.github/workflows/builder.yml#L53
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally the idea was to have a single pre-defined environment with protections created before the first run, and not to create any other environments in case they don't exist yet (which is what GH does - if you specify a non-existing environment
, it creates it). But after changing it to channel name per Stefan's suggestion, creating a third one for dev wouldn't do any harm now...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I was under the assumption that an environment always has some protection rule, but it seems that can be bypassed completely. I agree we should just use channel directly, and create a dev
environment without protection rules. 👍
There is another problem in our current build pipeline: Once we release a final release, beta should receive a bump as well (see https://github.com/home-assistant/core/blob/dev/.github/workflows/builder.yml#L309-L316).
@sairon can you add this to the pipeline as well?
As discussed here: #2855 (comment)
Beta users should also get latest stable without the need for manual bump. Suggested here: #2855 (comment)
As discussed here: #2855 (comment)
Beta users should also get latest stable without the need for manual bump. Suggested here: #2855 (comment)
By using a separate environment, we can postpone the bump in the version repository by adding a requirement for approval. Dev version will use default (empty string) environment which doesn't have any constraints.