Skip to content

ci: overhaul CI pipeline — release workflow, traceability labels, and quality gates#65

Closed
oguzkaganozt wants to merge 6 commits into
mainfrom
fix/ci-overhaul
Closed

ci: overhaul CI pipeline — release workflow, traceability labels, and quality gates#65
oguzkaganozt wants to merge 6 commits into
mainfrom
fix/ci-overhaul

Conversation

@oguzkaganozt
Copy link
Copy Markdown
Collaborator

@oguzkaganozt oguzkaganozt commented Apr 22, 2026

Summary

  • Replace the Autoware-synced release flow with a manual semver promotion workflow.
  • Add OCI traceability labels (build-tag, run-id) to built images.
  • Add CI quality gates: ShellCheck linting, Trivy scans, scheduled failure notifications, and pinned docs dependencies.
  • Reduce runner disk pressure in the heavier image build jobs.
  • Tighten setup-docker to setup.sh changes only.

CI Pipeline

flowchart LR
  PR([Pull Request]) --> lint[lint]
  PR --> setup[setup-docker]
  push([Push to main]) --> build[build-all-images]
  schedule([Schedule]) --> build
  build -->|success| scan[scan-images]
  build -->|success| summary[summarize]
  build -->|scheduled failure| notify[notify-failure]
Loading

Release Pipeline

flowchart LR
  dispatch([workflow_dispatch\nversion + build_tag]) --> validate[validate]
  validate --> release_images[release-images]
  release_images --> release_github[release-github]
Loading

Validation

  • Release validates the exact successful build-all-images run behind build_tag.
  • workflow_run scans use immutable build_tag image refs.
  • Workflow YAML parses cleanly.

Autoware-synced releases are no longer needed; OpenADKit now follows its own versioning independently.
- setup-docker: restrict trigger to setup.sh path changes only, update checkout to v6
- deploy-docs: pin dependency versions via docs/requirements.txt
- build-all-images: add free-disk-space step to build-common and build-components stages
- lint: shellcheck on PRs for .sh files (non-blocking, error severity only)
- scan: Trivy image scan after builds + weekly schedule, results to GitHub Security tab
- build-all-images: notify-failure job creates a GitHub issue on scheduled build failures
- notify-failure: add prepare to needs, remove non-existent ci-failure label
- scan: use repository_owner instead of actor for stable GHCR login
- build-all-images: embed build-tag and run-id as OCI labels in all bake targets
- build-all-images: add summarize job to surface build_tag in job summary after successful builds
- release: new workflow_dispatch-only workflow with validate → release-images → release-github stages
  - validates semver format, build_tag format, branch, tag uniqueness, registry existence
  - promotes 28 images via imagetools create (no rebuild)
  - resolves git SHA from run_id via GitHub API
  - creates git tag pointing to exact built commit, then GitHub Release with auto changelog
@oguzkaganozt
Copy link
Copy Markdown
Collaborator Author

Please review @youtalk @mitsudome-r

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR overhauls the repository’s GitHub Actions CI/release automation by introducing a manual semver promotion-based release workflow, adding image traceability labels, and adding new CI quality/scanning workflows while reducing runner disk pressure in heavy image build jobs.

Changes:

  • Add a manual release workflow that validates and promotes a specific immutable build_tag to a semver tag and creates a GitHub Release.
  • Add Trivy-based image scanning via a new scan-images workflow, plus a new ShellCheck lint workflow and docs dependency pinning via docs/requirements.txt.
  • Update build-all-images to free disk space earlier and attach OCI traceability labels to builds; tighten setup-docker PR triggering to setup.sh changes.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/requirements.txt New pinned-ish MkDocs dependency set for reproducible docs builds.
.github/workflows/deploy-docs.yaml Switch docs install step to pip install -r docs/requirements.txt.
.github/workflows/lint.yaml New ShellCheck workflow for .sh files.
.github/workflows/setup-docker.yaml Restrict PR trigger to setup.sh changes.
.github/workflows/build-all-images.yaml Add disk cleanup step earlier; add OCI traceability labels; add summary and scheduled failure issue creation.
.github/workflows/scan.yaml New Trivy scan workflow triggered by workflow_run, schedule, or manual dispatch.
.github/workflows/release.yaml New manual promotion workflow: validate build_tag, retag images to semver, create git tag + GitHub release.
.github/workflows/release-all-images.yaml Remove previous Autoware-synced scheduled release workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

workflow_dispatch:
pull_request:
paths:
- 'setup.sh'
build_tag="${build_date}-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}"
echo "image_ref=${{ env.IMAGE_PREFIX_COMPONENT }}:${{ matrix.target }}-${{ matrix.ros-distro }}-${build_tag}" >> "$GITHUB_OUTPUT"
else
echo "image_ref=${{ env.IMAGE_PREFIX_COMPONENT }}:${{ matrix.target }}-${{ matrix.ros-distro }}" >> "$GITHUB_OUTPUT"
Comment on lines +36 to +43
run_started_at="${{ github.event.workflow_run.run_started_at }}"
if [ -z "$run_started_at" ]; then
run_started_at="${{ github.event.workflow_run.created_at }}"
fi

build_date=$(date -u -d "$run_started_at" +%Y%m%d)
build_tag="${build_date}-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}"
echo "image_ref=${{ env.IMAGE_PREFIX_COMPONENT }}:${{ matrix.target }}-${{ matrix.ros-distro }}-${build_tag}" >> "$GITHUB_OUTPUT"
Comment on lines +10 to +12
runs-on: ubuntu-latest
continue-on-error: true
steps:
@oguzkaganozt
Copy link
Copy Markdown
Collaborator Author

Superseded by two scoped follow-up PRs for easier review:\n\n- #68 (release pipeline split)\n- #69 (CI/docs hygiene split)\n\nClosing this PR in favor of those two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants