github: add option to install optional dependencies in actions/install-lxd-runtimedeps#15797
Merged
tomponline merged 2 commits intocanonical:mainfrom Jun 14, 2025
Merged
Conversation
…l-lxd-runtimedeps Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
``` + sudo -E lxc storage create default zfs Installing LXD snap, please be patient. Error: Required tool "zpool" is missing ``` While `lvm2` is already part of the default package list on GHA runners, `zfsutils-linux` is not. Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
There was a problem hiding this comment.
Pull Request Overview
Adds an optional flag to the install-lxd-runtimedeps composite action and enables it in the test workflow.
- Introduce
optionalboolean input with defaultfalsein the action definition - Pass
optional: truein the tests workflow to install extra packages - Conditionally install
lvm2andzfsutils-linuxwhenoptionalis enabled
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/tests.yml |
Enable optional: true for the runtime‐deps action in the tests |
.github/actions/install-lxd-runtimedeps/action.yml |
Define optional input and conditionally install extra packages |
Comments suppressed due to low confidence (3)
.github/workflows/tests.yml:664
- Consider adding a parallel workflow run or a unit test for
optional: falseto verify the default behavior doesn’t install the optional packages.
optional: true
.github/actions/install-lxd-runtimedeps/action.yml:21
- It’s clearer to check for the positive case (
if [ "${OPTIONAL}" = "true" ]) to avoid treating any non-falsevalue as truthy.
if [ "${OPTIONAL}" != "false" ]; then
.github/actions/install-lxd-runtimedeps/action.yml:4
- The new
optionalinput should be documented in the action’s README or a top‐level comment so consumers know it’s available and what it does.
inputs:
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.