Publish as a distroless container and add a major-version release tag - #14
Merged
Merged
Conversation
…tion Mirrors curb's container setup (nullean/curb#72): the native-AOT linux-x64 build gets containerized via the .NET SDK's own container support onto a chiseled runtime-deps base, pushed to ghcr.io on every push to master (tagged edge) and on release tags (also latest and the semver). action.yml wraps it as a docker-based GitHub Action so a workflow can rewrite an assembly with no .NET SDK install. Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Lets a workflow pin this repo as a GitHub Action with uses: nullean/assembly-rewriter@v1 instead of an exact release tag, the same way actions/checkout@v5 stays on v5 across patch and minor releases. Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.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.
assembly-rewriterpublishes toghcr.io/nullean/assembly-rewriteras a distroless container image with a matching GitHub Action, and each release now also gets a floating major-version git tag.Prompt summary: Add the same ghcr.io container publishing curb already has, wrap it in a GitHub Action that calls the container, and add a floating major-tag workflow so this repo can be pinned as a GitHub Action the way
actions/checkout@v5is.Why
Every consumer of
assembly-rewriterneeded the .NET SDK installed to run it, even in CI, where a workflow step just wants to rewrite a couple of DLLs.curbsolved this for itself in nullean/curb#72; this repo didn't have the equivalent yet. There was also no way to reference this repo as a GitHub Action pinned to a major version — only exact tags — so a consumer wanting automatic minor/patch updates within a major had nothing to pin to.What
Container image
assembly-rewriter.csprojgainsEnableSdkContainerSupport, and a newpublishContainerstarget inTargets.fsrunsdotnet publish -t:PublishContaineragainst thelinux-x64AOT build on top ofmcr.microsoft.com/dotnet/runtime-deps:10.0-noble-chiseled— no shell, minimal surface, correct for a binary with no managed runtime to host. Tags follow the same split curb uses:edgeon every push tomaster, pluslatestand the plain semver when the push is an exact release tag.CI
The
aot-packmatrix'slinux-x64leg now also builds the container image without pushing, purely to prove the build itself still works on every trigger (this leg does print pre-existingILRepack/Mono.Ceciltrim warnings during the AOT compile — expected, and unrelated to this change). Thebuildjob logs in toghcr.ioand pushes for real, but only on push events, and only after the managed packages ship to GitHub Packages.GitHub Action
A new
action.ymlat the repo root wrapsdocker://ghcr.io/nullean/assembly-rewriter:edge, taking a single passthroughargsinput for the full-i/-opair list this tool already expects — so a workflow can rewrite an assembly with a singleuses:line and no SDK setup.Major-version tag
A new
create-major-tag.ymlworkflow runs on every published release and force-pushes avNtag at that commit, so a workflow can pinuses: nullean/assembly-rewriter@v1and follow every1.x.yrelease automatically, the same wayactions/checkout@v5works.Verify
CI's
aot-pack(linux-x64) leg proves the container still builds on every PR; the full push toghcr.ioonly happens on a push tomasteror a release tag.Made with Cursor