-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (77 loc) · 2.09 KB
/
workflow.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
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
defaults:
run:
shell: bash
jobs:
check_container:
env:
UBUNTU_TAG: ${{ matrix.ubuntu_tag }}
USER: random_user
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Check bootstrap control node
run: make check_bootstrap_control_node
- name: Check config
run: make check_host
- name: Check idempotence
run: |
make check_host | tee __build__/log
! (grep -oP "changed=\d+" __build__/log | grep -oPq "changed=[1-9]")
strategy:
matrix:
ubuntu_tag: ["22.04", "23.04", "23.10"]
check_locahost:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Config
run: make
- name: Check idempotence
run: |
make | tee __build__/log
! (grep -oP "changed=\d+" __build__/log | grep -oPq "changed=[1-9]")
# All format checks only available after complete machine setup
- name: Check format
run: |
make format
if [[ -n "$(git diff)" ]]; then
echo "Code is not formatted."
git diff
exit 1
fi
lint:
runs-on: ubuntu-22.04
steps:
# Checkout must be onto the original commit, not a single PR
# Otherwise lint will not see full history and diagnose secrets leakage
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Lint
run: make lint
scripts:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Generate roles graph
run: make graph
- name: Check update works
run: make update
- name: Show diff
run: git diff
name: dotfiles workflow
on:
pull_request:
branches:
- main
push:
branches:
- main