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

Use alternative environment for release build bump #2855

Merged
merged 3 commits into from
Oct 23, 2023

Conversation

sairon
Copy link
Member

@sairon sairon commented Oct 23, 2023

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.

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.
@sairon sairon added the build Build and CI related issues label Oct 23, 2023
@sairon sairon changed the title Use environment for release build bump Use alternative environment for release build bump Oct 23, 2023
@sairon sairon requested review from agners and ludeeus October 23, 2023 10:06
@sairon sairon requested a review from agners October 23, 2023 10:28
@agners agners merged commit e928fa4 into dev Oct 23, 2023
2 checks passed
@agners agners deleted the use-environment-for-release-build-bump branch October 23, 2023 10:34
if: ${{ github.repository == 'home-assistant/operating-system' }}
environment: "${{ github.event_name == 'release' && needs.prepare.outputs.channel || '' }}"
Copy link
Member

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

Copy link
Member Author

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...

Copy link
Member

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?

sairon added a commit that referenced this pull request Oct 30, 2023
sairon added a commit that referenced this pull request Oct 30, 2023
Beta users should also get latest stable without the need for manual
bump.

Suggested here: #2855 (comment)
agners pushed a commit that referenced this pull request Oct 31, 2023
agners pushed a commit that referenced this pull request Oct 31, 2023
Beta users should also get latest stable without the need for manual
bump.

Suggested here: #2855 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build and CI related issues cla-signed hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants