-
Notifications
You must be signed in to change notification settings - Fork 551
62 lines (47 loc) · 1.53 KB
/
blank.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
Romeo Rosete # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
name: Livepatch specs check
on:
push:
branches: [2.0, fasttrack/*]
pull_request:
branches: [2.0, fasttrack/*]
permissions: read-all
jobs:
spec-check:
name: Livepatches check
runs-on: ubuntu-latest
steps:
# Checkout the branch of our repo that triggered this action
- name: Workflow trigger checkout
uses: actions/checkout@v4
- name: Setup Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Get Python dependencies
run: |
sudo apt-get install -y python3-rpm
sudo python3 -m pip install -r toolkit/scripts/requirements.txt
- name: Check livepatch specs are valid
run: |
export [email protected]
export USER_NAME=test
.github/workflows/overwrite_shell_link.sh
if ! toolkit/scripts/livepatching/update_livepatches.sh >/dev/null
then
echo "ERROR: failed to verify livepatch specs." >&2
exit 1
fi
if [[ -z "$(git diff)" ]]
then
exit 0
fi
cat << EOF
#################### CHECK FAILURE ####################
Livepatch specs need to be updated!
Run the following command to perform the update:
toolkit/scripts/livepatching/update_livepatches.sh
#################### CHECK FAILURE ####################
EOF
exit 1