aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorArif Ali <arif.ali@canonical.com>2022-10-30 19:16:48 +0000
committerJake Hunsaker <jhunsake@redhat.com>2022-11-03 10:39:13 -0400
commit8a3b188b7b683ca2ff09abbd5f05f7388d24052a (patch)
treefbbc27e382879356f4ea7f42111f50ed50c6f8aa /.github
parentfc9478cf61ceb4beb4a723804aed97ec758e9c09 (diff)
downloadsos-8a3b188b7b683ca2ff09abbd5f05f7388d24052a.tar.gz
[build] Build snap and push to latest/edge
When a any MRs or commits are added to the main branch then automatically create a snap, and push to latest/edge channel Signed-off-by: Arif Ali <arif.ali@canonical.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/snap.yaml26
1 files changed, 26 insertions, 0 deletions
diff --git a/.github/workflows/snap.yaml b/.github/workflows/snap.yaml
new file mode 100644
index 00000000..68cc8a72
--- /dev/null
+++ b/.github/workflows/snap.yaml
@@ -0,0 +1,26 @@
+name: snap
+on:
+ push:
+ branches:
+ - main
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: snapcore/action-build@v1
+ id: build-snap
+ # Make sure the snap is installable
+ - run: |
+ sudo snap install --dangerous ${{ steps.build-snap.outputs.snap }}
+ # Do some testing with the snap
+ - run: |
+ sos help
+ - uses: snapcore/action-publish@v1
+ env:
+ SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
+ with:
+ snap: ${{ steps.build-snap.outputs.snap }}
+ snapcraft-channel: "latest/edge"