hector-cao is creating testing snap #81
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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' && !startsWith(github.ref, '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 |