Skip to content

hector-cao is creating testing snap #93

hector-cao is creating testing snap

hector-cao is creating testing snap #93

name: Do a snap build of checkbox provider
run-name: ${{ github.actor }} is creating testing snap
on:
push:
branches:
- noble-24.04
paths:
- 'tests/**'
pull_request:
branches:
- noble-24.04
paths:
- 'tests/**'
workflow_dispatch: # Allow manual trigger
jobs:
check-secret:
runs-on: ubuntu-22.04
outputs:
snap-key: ${{ steps.snap-key.outputs.defined }}
steps:
- id: snap-key
name: Set defined=true if SNAPCRAFT7_CREDS is defined
if: "${{ env.SNAPSTORE_KEY != '' }}"
run: echo "defined=true" >> $GITHUB_OUTPUT
env:
SNAPSTORE_KEY: ${{ secrets.SNAPCRAFT7_CREDS }}
build:
runs-on: ubuntu-22.04
needs: [check-secret]
steps:
- uses: actions/checkout@v4
name: Checkout
- uses: snapcore/action-build@v1
name: Build snap
id: build
with:
path: tests
snapcraft-channel: latest/stable
- name: Verify snap
run: |
sudo snap install checkbox22
sudo snap install --dangerous --classic ${{ steps.build.outputs.snap }}
- if: needs.check-secret.outputs.snap-key == 'true' && (github.ref_name == 'noble-24.04')
name: Publish snap to edge channel
uses: snapcore/[email protected]
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }}
with:
snap: ${{ steps.build.outputs.snap }}
release: edge