Skip to content

Ensure that ARCH global vars always exist #1273

Ensure that ARCH global vars always exist

Ensure that ARCH global vars always exist #1273

Workflow file for this run

name: "Snapcraft"
on:
push:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- '**.go'
- 'go.mod'
- 'snap/**'
- '.github/workflows/snap.yml'
- 'scripts/dqlite/**'
- 'Makefile'
- 'make_functions.sh'
workflow_dispatch:
permissions:
contents: read
jobs:
snap:
name: linux-amd64
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- name: Install Dependencies
shell: bash
run: |
set -euxo pipefail
sudo snap install snapcraft --classic
echo "/snap/bin" >> $GITHUB_PATH
- name: Checkout
uses: actions/checkout@v3
- name: Setup LXD
uses: canonical/setup-lxd@4e959f8e0d9c5feb27d44c5e4d9a330a782edee0
- name: Set up Go
if: env.RUN_TEST == 'RUN'
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
- name: Build snap
shell: bash
run: |
set -euxo pipefail
snapcraft --use-lxd
- name: Install snap
shell: bash
run: |
set -euxo pipefail
sudo snap install *.snap --dangerous
# Since we're installing dangerously, we need to
# manually grant permissions to juju
sudo snap connect juju:lxd lxd
sudo snap connect juju:config-lxd
sudo snap connect juju:dot-local-share-juju
sudo snap connect juju:ssh-keys
snap connections juju
- name: Test bootstrap
shell: bash
run: |
set -euxo pipefail
mkdir ~/.ssh
juju bootstrap localhost --debug