Make server releases immutable-safe#4988
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the server release automation by freezing an exact source commit, validating immutability/attestations/assets/image digests before publishing, and replacing the legacy privileged token flow with narrowly scoped GitHub App tokens.
Changes:
- Added
scripts/release_workflow.py(and tests) to centralize release-tag/version, asset, OCI manifest, and add-on changelog verification/update logic in Python. - Updated the release workflow to build/verify an exact multi-arch image tag first, publish an immutable release only after validation, and only then promote rolling image aliases + downstream updates.
- Updated the release-notes generator/action + tests to compare against an exact head SHA instead of a moving branch name.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/test_generate_release_notes.py |
Updates tests to reflect SHA-based comparisons for release note generation. |
tests/scripts/test_release_workflow.py |
Adds focused tests for the new immutable-safe release workflow helper behaviors and workflow pinning/token removal. |
scripts/release_workflow.py |
New helper CLI/library for release channel/version decisions, asset verification, OCI manifest verification, and add-on changelog updates. |
.github/workflows/release.yml |
Major rework to freeze a source SHA, verify draft/assets/image, publish immutably, then promote aliases and downstream updates using scoped tokens. |
.github/workflows/RELEASE_WORKFLOW_GUIDE.md |
Rewrites the guide to document the new immutable-safe release process and recovery/rollout steps. |
.github/workflows/RELEASE_NOTES_GENERATION.md |
Updates documentation to describe SHA-based comparisons and the tag-based previous-tag selection rules. |
.github/workflows/auto-release.yml |
Refactors auto-release to resolve channel branch + source SHA first, compute versions from tags, then call the reusable release workflow. |
.github/actions/generate-release-notes/generate_notes.py |
Switches “between tags” logic to compare against a fixed SHA rather than a branch name. |
.github/actions/generate-release-notes/action.yml |
Updates composite action interface to accept head-sha and a checkout path, and pins setup-python. |
Comments suppressed due to low confidence (1)
.github/workflows/release.yml:996
- [PROBLEM]
actions/create-github-app-tokenis givenrepositories: ${{ github.repository }}(owner/repo) while other steps pass bare repo names (e.g.repositories: home-assistant-addon), which is likely to break token minting becauseowneris already set separately.
repositories: ${{ github.repository }}
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this implement/fix?
GitHub releases currently become public before their exact assets, multi-architecture image, and downstream updates are verified.
Related issue (if applicable):
Types of changes
bugfixnew-featureenhancementnew-providerbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/modelsis linked.music-assistant/frontendis linked.