Skip to content

Reusable workflows - #4

Merged
karofox merged 5 commits into
mainfrom
reusable-workflows
Apr 14, 2026
Merged

Reusable workflows#4
karofox merged 5 commits into
mainfrom
reusable-workflows

Conversation

@karofox

@karofox karofox commented Apr 14, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

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 refactors the existing Docker build workflow into a reusable GitHub Actions workflow, and adds a caller workflow that invokes it for multiple ROS distro/tag combinations.

Changes:

  • Added a new caller workflow that runs builds for humble and jazzy, plus a separate latest tag build.
  • Converted the existing Docker workflow into a reusable workflow_call template with inputs for image name, Dockerfile path, and base tag.
  • Updated tagging logic to use template inputs rather than a hardcoded image name and distro matrix.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/docker.yaml New caller workflow that invokes the reusable template for multiple distros/tags.
.github/workflows/docker-template.yaml Reusable workflow template parameterized via workflow_call inputs and used by the caller workflow.
Comments suppressed due to low confidence (2)

.github/workflows/docker-template.yaml:58

  • github.event_name will be workflow_call inside a reusable workflow, so this condition will never be true and SUFFIX will always be empty. If you need PR-specific tags, compute/pass a suffix from the caller workflow (as an input), or detect PRs via ref patterns (e.g., refs/pull/).
    .github/workflows/docker-template.yaml:73
  • This if guard will prevent the manifest job from ever running in this reusable workflow because github.event_name is workflow_call (even when the caller was triggered by push). If the manifest should only run for push builds, gate it in the caller job (using if: on the job that calls this workflow) or pass an explicit boolean input like publish_manifest and use that here.

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

@karofox
karofox merged commit 4542578 into main Apr 14, 2026
13 checks passed
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