fix(ci): Fix Linting (#61)
This commit is contained in:
parent
6d793c5c96
commit
2296959894
23
.github/workflows/lint.yml
vendored
23
.github/workflows/lint.yml
vendored
@ -1,31 +1,30 @@
|
|||||||
---
|
---
|
||||||
name: Lint
|
name: Linting
|
||||||
'on':
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
ansible-lint:
|
||||||
test:
|
name: YAML Lint + Ansible Lint
|
||||||
name: Lint
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the codebase.
|
- name: Check out the codebase
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Python 3.7.
|
- name: Set up Python 3.x
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
|
|
||||||
- name: Install test dependencies.
|
- name: Install test dependencies
|
||||||
run: pip3 install yamllint ansible-lint ansible
|
run: pip3 install yamllint ansible-lint ansible
|
||||||
|
|
||||||
- name: Run yamllint.
|
- name: Run yamllint
|
||||||
run: yamllint .
|
run: yamllint .
|
||||||
|
|
||||||
- name: Run ansible-lint.
|
- name: Run ansible-lint
|
||||||
run: ansible-lint
|
run: ansible-lint
|
||||||
|
|||||||
@ -66,6 +66,7 @@
|
|||||||
name: k3s-init
|
name: k3s-init
|
||||||
state: stopped
|
state: stopped
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Copy K3s service file
|
- name: Copy K3s service file
|
||||||
register: k3s_service
|
register: k3s_service
|
||||||
|
|||||||
@ -6,3 +6,4 @@
|
|||||||
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
|
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
|
||||||
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
|
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
|
||||||
notify: reboot
|
notify: reboot
|
||||||
|
when: not ansible_check_mode
|
||||||
|
|||||||
@ -6,7 +6,8 @@
|
|||||||
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
|
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
|
||||||
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
|
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
|
||||||
notify: reboot
|
notify: reboot
|
||||||
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Install linux-modules-extra-raspi
|
- name: Install linux-modules-extra-raspi
|
||||||
apt: name=linux-modules-extra-raspi state=present
|
apt: name=linux-modules-extra-raspi state=present
|
||||||
when: raspberry_pi
|
when: (raspberry_pi) and (not ansible_check_mode)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user