diff --git a/.github/actions/image-setup/action.yml b/.github/actions/image-setup/action.yml index ab2413aba..2b68e2c85 100644 --- a/.github/actions/image-setup/action.yml +++ b/.github/actions/image-setup/action.yml @@ -35,14 +35,8 @@ runs: - name: Setup LXD ${{ inputs.lxd-channel }} shell: bash run: | - sudo snap refresh lxd --channel=${{ inputs.lxd-channel }} + sudo snap refresh lxd --channel=${{ inputs.lxd-channel }} || sudo snap install lxd --channel=${{ inputs.lxd-channel }} + sudo snap set lxd daemon.group=adm sudo lxd waitready --timeout 60 - sudo chmod 777 /var/snap/lxd/common/lxd/unix.socket sudo lxd init --auto lxc version - - - name: Print supported LXD drivers - shell: bash - run: | - lxc query /1.0 | jq '.environment.driver' - sudo lxc query /1.0 | jq '.environment.driver' diff --git a/.github/workflows/image-fedora.yml b/.github/workflows/image-fedora.yml index 4df7e36b2..8e5532cf8 100644 --- a/.github/workflows/image-fedora.yml +++ b/.github/workflows/image-fedora.yml @@ -24,6 +24,7 @@ jobs: release: - 38 - 39 + - 40 variant: - default - cloud diff --git a/bin/test-image b/bin/test-image index db4f22bf0..f358c5b08 100755 --- a/bin/test-image +++ b/bin/test-image @@ -2,7 +2,7 @@ set -eu # Source helper functions. -. $(realpath $(dirname "$0")/helpers) +. "$(realpath "$(dirname "$0")/helpers")" # Check input arguments. if [ "${1:-}" = "" ] || [ "${2:-}" = "" ] || [ "${3:-}" = "" ] || [ "${4:-}" = "" ] || [ "${5:-}" = "" ]; then @@ -17,7 +17,7 @@ VARIANT=${4} TARGET=${5} # Ensure lxc is installed. -if ! which lxc >/dev/null; then +if ! command -v lxc >/dev/null; then echo "==> FAIL: Binary 'lxc' not found!" exit 1 fi @@ -64,7 +64,6 @@ cleanup() { FAIL=1 trap cleanup EXIT HUP INT TERM -FINGERPRINT=$(cat "${TEST_DIR}/meta" "${TEST_DIR}/root" | sha256sum | cut -d' ' -f1) lxc image import "${TEST_DIR}/meta" "${TEST_DIR}/root" --alias "${TEST_IMAGE}" echo "==> Creating the instances"