Skip to content

Commit

Permalink
ci: add snap workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Saviq authored and sylvestre committed Apr 17, 2023
1 parent c54d01c commit f4696aa
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/close-snap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Close Snaps

on:
pull_request:
types: [closed]

jobs:
close:
runs-on: ubuntu-latest

timeout-minutes: 5

steps:
- name: Close obsolete channels
uses: canonical/actions/close-snap@release
continue-on-error: true
with:
channel: edge/pr${{ github.event.number }}
snapcraft-token: ${{ secrets.SNAPCRAFT_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/snap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Snap

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
Snap:
runs-on: ubuntu-latest

timeout-minutes: 45

strategy:
matrix:
platform:
- amd64
- armhf
- arm64
# Broken dependencies: - ppc64el
# Broken environment: - s390x

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0 # needed for version determination

- name: Build and publish the snap
uses: canonical/actions/build-snap@multiarch
with:
architecture: ${{ matrix.platform }}
snapcraft-token: ${{ secrets.SNAPCRAFT_TOKEN }}
publish: ${{ github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name }}
publish-channel: edge/pr${{ github.event.number }}

0 comments on commit f4696aa

Please sign in to comment.