Add an image tarball output that later jobs can load and test
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- docker, github-actions
- 领域
- ci-cd
调研方向
Start with bake.yml and build.yml, which currently accept only image or local for output, and trace how output: local combines with artifact-upload to produce and upload a filesystem export. Follow the same path for the docker exporter, ensuring each matrix runner uploads its own platform tarball as an artifact. Done means a caller can set output: docker and artifact-upload: true, download the matching artifact, and run docker load --input image.tar in a later job.
由索引模型根据 Issue 内容生成。
描述
I use bake.yml to build 36 images in https://github.com/home-operations/containers. On each pull request, I want to run integration tests against the built image. The tests start the image as a container on an amd64 runner and on an arm64 runner.
bake.yml and build.yml accept only image or local for output. The build runs in jobs inside the reusable workflow. The image is not in the Docker image store of any caller job, so a test job can only pull it from a registry.
To test a pull request today, I must push the image to a scratch repository and test it by digest. A scratch repository is a registry repository that only holds test images. This has three costs:
- Pull request runs need
packages: writeand registry credentials. - The scratch repository grows, and I must delete old versions myself.
- Pull requests from forks cannot push, so they cannot run the tests.
I want an output that exports the image with the docker exporter and uploads the tarball as a GitHub artifact. When distribute is true, each runner builds one platform, so each runner can upload one tarball. output: local with artifact-upload already does this for a filesystem export.
A test job on the matching runner can then download the artifact, run docker load, and test the image. The test job does not need a registry or push credentials.
The example below shows the idea. output: docker and the artifact name are not real values.
jobs:
build:
uses: docker/github-builder/.github/workflows/bake.yml@v1
with:
output: docker
artifact-upload: true
test:
needs: build
strategy:
matrix:
arch: [amd64, arm64]
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-26.04-arm' || 'ubuntu-26.04' }}
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v8
with:
name: docker-github-builder-assets-linux-${{ matrix.arch }}
- run: docker load --input image.tar
- run: make test
- 主要语言
- 没有语言数据
- 星标
- 94
- 派生
- 28
- 平均合并
- 2 天 7 小时
- 30 天内合并 PR
- 20
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
docker/github-builder 的其他 Issue
-
kind/enhancement
难度 5/5 一周以上 新手友好度 30/100
docker/github-builder#356 ·
维护者通常 1 天内回复
-
kind/enhancement status/triage
难度 4/5 3-5 天 新手友好度 38/100
docker/github-builder#347 ·
维护者通常 1 天内回复
-
kind/enhancement status/triage
难度 3/5 1-2 天 新手友好度 57/100
docker/github-builder#343 · 1 条评论 ·
维护者通常 1 天内回复
-
status/needs-investigation
难度 4/5 3-5 天 新手友好度 48/100
docker/github-builder#328 · 1 条评论 ·
维护者通常 1 天内回复
-
kind/enhancement status/triage
难度 5/5 一周以上 新手友好度 25/100
docker/github-builder#203 · 1 条评论 ·
维护者通常 1 天内回复
查看 docker/github-builder 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
Netcracker/qubership-authz-agent#416 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
Netcracker/qubership-core-base-images#400 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
developmentseed/titiler-covjson#163 ·
维护者通常 1 天内回复
-
`LogProxyConsumer._on_relation_departed` raises `APIError` when the promtail service does not exist未关闭
难度 2/5 1-3 小时 新手友好度 78/100
canonical/loki-k8s-operator#695 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
salesforce/sa11y#1022 ·