Skip to content

Commit 49e7db5

Browse files
committed
ci: snap build uses destructive mode
The bare `snapcraft` invocation defaulted to the LXD build provider, which fails on GitHub Actions runners because the runner user isn't in the `lxd` group and snapcraft can't add it on the fly. Switch to `snapcraft pack --destructive-mode` so snapcraft builds directly on the runner — the standard pattern for ephemeral CI. Also replaces the bare `snapcraft` command which is deprecated in snapcraft 8+.
1 parent ed43fe0 commit 49e7db5

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/snap.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,14 @@ jobs:
7373
- name: Build snap
7474
id: snapcraft
7575
run: |
76-
snapcraft
76+
# Use destructive mode so snapcraft builds directly on the runner
77+
# instead of spinning up an LXD container. The default LXD provider
78+
# fails on GitHub Actions runners because the runner user isn't in
79+
# the `lxd` group and snapcraft can't add it on the fly. Destructive
80+
# mode is the standard pattern for ephemeral CI environments.
81+
# `snapcraft pack` replaces the bare `snapcraft` invocation which
82+
# is deprecated in snapcraft 8+.
83+
sudo snapcraft pack --destructive-mode
7784
SNAP_FILE=$(ls *.snap | head -1)
7885
echo "snap=$SNAP_FILE" >> $GITHUB_OUTPUT
7986
echo "Built snap: $SNAP_FILE"

0 commit comments

Comments
 (0)