Publish as a distroless container and add a major-version release tag - #42
Merged
Merged
Conversation
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 diff assemblies with no .NET SDK install. Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Lets a consumer pin a container reference or an action reference to a major version (e.g. ghcr.io/nullean/assembly-differ:1) instead of an exact patch, matching elastic/docs-actions' own release workflow. Adapted with a plain ubuntu-latest runner and no failure notification, neither of which this repo has the infrastructure for. Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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-differpublishes toghcr.io/nullean/assembly-differas 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 — to this repo and to curb, if curb doesn't have it yet.Why
Every consumer of
assembly-differneeded the .NET SDK installed to run it, even in CI, where a workflow step just wants to diff two assembly sources and read the result.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-differ.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. 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-differ:edge, takingfirstandsecond(the two provider specsdiffalready takes) plus a passthroughargsfor everything else — so a workflow can diff two assemblies 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-differ@v1and follow every1.x.yrelease automatically, the same wayactions/checkout@v5works.Out of scope
curbdoesn't have the major-tag workflow either — that's added directly tocurbin a separate change, not through this PR.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.