-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (41 loc) · 1.35 KB
/
security-updates.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
name: 'Security updates'
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
# NOTE: This is to prevent races to publish between publish-beta and security-updates workflows (or
# in fact, races with instances of themselves if that is possible). If adding things to this
# concurrency group, be aware that any pending workflow will be cancelled if another one in this
# group is triggered.
concurrency: beta-channel
jobs:
security-updates:
name: 'Security updates'
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: beta
- name: Check for outdated Ubuntu packages
id: check
uses: timsueberkrueb/action-check-snap@master
with:
snap: veloren
channel: beta
# Without this the build action below will set veloren_beta.snap as the
# output instead of the newly build snap!
- name: Cleanup checked snap
run: rm *.snap
- if: fromJSON(steps.check.outputs.outdated)
id: build
name: Build the snap package
uses: snapcore/action-build@v1
- if: fromJSON(steps.check.outputs.outdated)
name: Deploy the snap package
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
with:
snap: ${{ steps.build.outputs.snap }}
release: beta