ci: tryfix snap building
CI / build (push) Successful in 2m45s
CI / test (push) Skipped
CI / snap (push) Failing after 27s

This commit is contained in:
2026-08-22 21:20:44 +02:00
parent c1079d43be
commit e2d201d815
2 changed files with 22 additions and 6 deletions
+21 -6
View File
@@ -94,13 +94,28 @@ jobs:
snap:
needs: build
runs-on: ubuntu-latest
outputs:
snap-file: ${{ steps.build-snap.outputs.snap }}
container:
# Official snapcraft image: an Ubuntu userland matching the snap base,
# with snapcraft preinstalled (no snapd/systemd/LXD required).
image: ghcr.io/canonical/snapcraft:8_core24
steps:
- name: Install build prerequisites
run: |
apt-get update -q
apt-get install -y -q --no-install-recommends git curl
- uses: actions/checkout@v6
- uses: snapcore/action-build@v1
id: build-snap
- uses: actions/upload-artifact@v4
- name: Build snap
run: |
# GitHub Actions overrides the image entrypoint (pebble), which is
# what normally puts craftctl on PATH; restore it, allow git to run
# in the checked-out tree, and provide rustup for the rust plugin.
git config --global --add safe.directory '*'
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
export PATH="/usr/libexec/snapcraft:$HOME/.cargo/bin:$PATH"
snapcraft pack --destructive-mode
- name: Upload snap artifact
uses: actions/upload-artifact@v4
with:
name: snap
path: ${{ steps.build-snap.outputs.snap }}
path: ./*.snap
if-no-files-found: error
+1
View File
@@ -22,6 +22,7 @@ parts:
craftctl set version=$(git rev-parse --short=11 HEAD)
craftctl set grade="devel"
build-packages:
- build-essential
- pkg-config
- libssl-dev
- libgpg-error-dev