Reusable workflows - #4
Merged
Merged
Conversation
There was a problem hiding this comment.
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
humbleandjazzy, plus a separatelatesttag build. - Converted the existing Docker workflow into a reusable
workflow_calltemplate 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_namewill beworkflow_callinside a reusable workflow, so this condition will never be true andSUFFIXwill 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
ifguard will prevent the manifest job from ever running in this reusable workflow becausegithub.event_nameisworkflow_call(even when the caller was triggered bypush). If the manifest should only run for push builds, gate it in the caller job (usingif:on the job that calls this workflow) or pass an explicit boolean input likepublish_manifestand use that here.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.