feat: add container-structure-test action kickstart#1
Merged
ChristophShyper merged 10 commits intomasterfrom Apr 12, 2026
Merged
feat: add container-structure-test action kickstart#1ChristophShyper merged 10 commits intomasterfrom
ChristophShyper merged 10 commits intomasterfrom
Conversation
…d comprehensive CLI support Agent-Logs-Url: https://github.com/devops-infra/container-structure-test/sessions/12a900b5-99e4-4bd0-865d-be7d8331c2ec Co-authored-by: ChristophShyper <45788587+ChristophShyper@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add GitHub action for container structure test
Add comprehensive GitHub Action for container-structure-test (Alpine, multi-arch)
Apr 11, 2026
There was a problem hiding this comment.
Pull request overview
Adds a production-ready Docker-based GitHub Action for running Google container-structure-test against images/OCI layouts, following the devops-infra action pattern.
Changes:
- Implement CST wrapper in
entrypoint.shwith full input validation, command construction, and metrics extraction as outputs. - Switch image to Alpine and install CST binary with checksum verification for multi-arch builds.
- Add local build/smoke-test Task targets and bash unit tests for the entrypoint, plus smoke-test jobs in workflows.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
entrypoint.sh |
Builds/validates CST CLI args, runs CST, parses totals/passed/failed, exports outputs |
Dockerfile |
Alpine-based image, installs bash/curl/jq, downloads CST per-arch + checksum verify |
action.yml |
Defines action inputs/outputs and points to the published Docker image |
Taskfile.docker.yml |
Adds local build + local run + smoke test helpers |
Taskfile.cicd.yml |
Adds task test + test:entrypoint runner task |
tests/test_entrypoint.sh |
Adds bash unit tests with a fake container-structure-test binary |
tests/fixtures/local-image.yml |
Container-structure-test config to validate the built action image |
.github/workflows/* |
Adds a post-job smoke-test stage to multiple workflows |
.env.example |
Adds example env vars for Docker/GitHub publishing workflows |
README.md |
Updates documentation for the new action (usage, inputs/outputs, local tasks) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ChristophShyper
approved these changes
Apr 12, 2026
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.
Implements a production-ready GitHub Action wrapping GoogleContainerTools/container-structure-test following the devops-infra action pattern. Supports all CST CLI inputs, exports key test stats as outputs, and ships a multi-arch (
amd64/arm64) Alpine-based Docker image.Dockerfile
alpine:3.21bash,curl,jqviaapk --no-cachecontainer-structure-testbinary from GitHub Releases usingTARGETARCHfor multi-arch builds; binary version pinned viaARG CST_VERSIONwith a Renovate annotation for automatic updatesaction.ymlFull input surface covering all CST
testsubcommand flags:image,image_from_oci_layout,default_image_tag,ignore_ref_annotationconfig(space- or newline-separated paths)driver,platform,runtime,forcepull,save,quiet,no_coloroutput(text/json/junit),test_report,junit_suite_name,metadatadebugOutputs:
total,passed,failed,exit_codeentrypoint.shtr -s '[:space:]' ' 'test_reportset → CST writes to file, action cats it and parses JSON;test_reportunset → output captured viatee, stats parsed per format (text: grep, json: jq, junit: grep XML attributes)README.mdFull API reference tables, four usage examples (basic, multi-config JSON, JUnit, TAR driver), and a test config YAML reference.
Example usage
Original prompt