Add actions/worker-image: create/update/no-op composite action for the shared LabVIEW worker image - #41
Open
antsundq wants to merge 4 commits into
Open
Conversation
…e shared LabVIEW worker image
…ithub/labview/vipm/ path
…ile inside context
… calls The 'not found' case from crane digest is how create/update is detected, but it left $LASTEXITCODE non-zero through Write-Host/Out-File (which don't touch it), so GitHub Actions' pwsh wrapper failed the step on every single create/update run before Build and push ever executed.
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.
Motivation
In order to use this projects capabilities as modules or components in a Github Actions workflow, the actions needs to be callable as composite actions through the
usingkeyword. I made a PR to support running unit tests in a docker image in this way, but there is currently no way to build the custom image required for this. This PR resolves this.Summary
Adds
actions/worker-image, a composite action that builds (or reuses) the LabVIEW CI worker image other actions (unit-tests,vi-analyzer, ...) pull and run against — currently nothing produces that image in one step.It's create / update / no-op, not "always rebuild": every input affecting the image's content is hashed into a deterministic tag, and
crane digestchecks the registry for that exact tag before building. Found → no-op (just retag). Not found → build (create or update). This reusesbuild-labview-image.yml's existing content-hash scheme; the registry existence check is the one new mechanism.Always acts as a client of the shared LCWC base image (never builds/publishes the base itself). No
.github/labview-ci.ymlparsing — caller passes an explicitdeps-dirinput, matching every other composite action here. Windows-only, matchingmasscompile/vi-analyzer/unit-tests.Files (all new, under
actions/worker-image/)action.yml(new), plus copies of existing vendored files:Dockerfile,install-vipc.ps1,ci-tooling.vipc(baked in by default so built images work withactions/unit-testsout of the box),ensure-docker.ps1(waits out a known intermittentwindows-2022Docker-daemon-not-ready issue).Test plan
End-to-end verified against
lunit-integration-test— create, no-op, update, determinism, and interop withactions/unit-tests:crane copyfast path)framework: lunitpassed against an image this action built)