-
Notifications
You must be signed in to change notification settings - Fork 102
91 lines (76 loc) · 2.4 KB
/
snap.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Snap
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-pr${{ github.event.number }}
cancel-in-progress: true
jobs:
mir-libs:
runs-on: ubuntu-latest
timeout-minutes: 360
strategy:
fail-fast: false
matrix:
architecture:
- amd64
- armhf
- arm64
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.architecture }}
snapcraft-token: ${{ secrets.SNAPCRAFT_TOKEN }}
publish: ${{ github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name }}
publish-channel: 22/edge/pr${{ github.event.number }}
snap:
# Only run if we have access to secrets.
if: ${{ github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name }}
needs: [mir-libs]
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
snap:
- MirServer/mir-test-tools
- MirServer/confined-shell-wip
- MirServer/ubuntu-frame
- Miriway/Miriway
architecture:
- amd64
- armhf
- arm64
include:
- snap: MirServer/mir-test-tools
track: 22
- snap: MirServer/confined-shell-wip
track: latest
- snap: MirServer/ubuntu-frame
track: 22
- snap: Miriway/Miriway
track: latest
review-opts: --allow-classic
steps:
- name: Check out code
uses: actions/checkout@v3
with:
repository: ${{ matrix.snap }}
ref: mir-libs-build
fetch-depth: 0 # needed for version determination
- name: Tweak the stage snap
run: |
sed -i 's@- mir-libs.*$@\0/pr${{ github.event.number }}@' snap/snapcraft.yaml
- name: Build and publish the snap
uses: canonical/actions/build-snap@multiarch
with:
architecture: ${{ matrix.architecture }}
review-opts: ${{ matrix.review-opts }}
snapcraft-token: ${{ secrets.SNAPCRAFT_TOKEN }}
publish: true
publish-channel: ${{ matrix.track }}/edge/mir-pr${{ github.event.number }}