Skip to content

ci(docker): add CI build and push workflows for docker-new#7012

Merged
xmfcx merged 1 commit intoautowarefoundation:mainfrom
xmfcx:ci/docker-new/add-new-workflows
Apr 14, 2026
Merged

ci(docker): add CI build and push workflows for docker-new#7012
xmfcx merged 1 commit intoautowarefoundation:mainfrom
xmfcx:ci/docker-new/add-new-workflows

Conversation

@xmfcx
Copy link
Copy Markdown
Contributor

@xmfcx xmfcx commented Apr 13, 2026

  • Parent issue: Migrate and replace old Docker pipeline with docker-new #7003

  • Add three CI workflows that build and push docker-new images to ghcr.io/autowarefoundation/autoware-new

  • Extend docker-bake.hcl with CI variables (REGISTRY, PLATFORM, TAG_*) and a ctx() function for cross-job registry context resolution

  • Add "Pull from GHCR" documentation to README

Why

PR 1 (#7004) landed the Dockerfiles, HCL, and ansible playbook for local builds. This PR adds the CI pipeline so images are automatically built and published on every push to main and on semver tags. Each distro (jazzy/humble) builds in 4 sequential groups (base -> core -> universe/universe-cuda) with dual-arch (amd64 + arm64) support and multi-arch manifests.

Workflow architecture

docker-build-and-push-new.yaml  (orchestrator: changed-files gate, triggers per-distro)
  └─ docker-build-pipeline-new.yaml  (per-distro: chains groups sequentially)
       └─ docker-build-new.yaml  (reusable: builds one bake group, dual-arch + manifests)

HCL changes

  • docker-new/docker-bake.hcl: tags() now generates registry tags when REGISTRY is set (local builds unchanged). ctx() switches between target: (local) and docker-image:// (CI) for cross-group dependencies.

Tag scheme

Trigger Tag example
Push to main base-jazzy, base-jazzy-20260413
Semver tag 1.2.3 base-jazzy-1.2.3
workflow_dispatch from branch base-jazzy-feat-foo

Test plan

  • Validate HCL locally (no REGISTRY set, should produce only local tags):
    docker buildx bake -f docker-new/docker-bake.hcl --print 2>/dev/null | jq '.target.base.tags'
    # Expected: ["autoware:base-jazzy"]
  • Validate HCL with CI variables:
    REGISTRY=ghcr.io/test PLATFORM=amd64 TAG_DATE=20260413 docker buildx bake -f docker-new/docker-bake.hcl --print 2>/dev/null | jq '.target.base.tags'
    # Expected: ["ghcr.io/test:base-jazzy-amd64", "ghcr.io/test:base-jazzy-20260413-amd64"]
  • Validate ctx() switches to registry in CI mode:
    REGISTRY=ghcr.io/test PLATFORM=amd64 USE_REGISTRY_CONTEXTS=true docker buildx bake -f docker-new/docker-bake.hcl --print 2>/dev/null | jq '.target["core-dependencies"].contexts["autoware-base"]'
    # Expected: "docker-image://ghcr.io/test:base-jazzy-amd64"
  • Full pipeline run on fork: https://github.com/xmfcx/autoware/actions/runs/24334918069
  • Trigger workflow_dispatch on upstream after merge and verify the full pipeline runs

Integration test branches

Test branches that use the new docker images in downstream repo CI:

autoware_core:

autoware_universe:

Signed-off-by: Mete Fatih Cırıt <[email protected]>
@xmfcx xmfcx self-assigned this Apr 13, 2026
@github-actions
Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@xmfcx xmfcx added the run:health-check Run health-check label Apr 13, 2026
@xmfcx xmfcx marked this pull request as ready for review April 13, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:health-check Run health-check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants