1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_i3wm.git synced 2024-08-16 10:09:53 +02:00

Improve linting

This commit is contained in:
L3D 2023-10-23 00:23:12 +02:00
parent 63b8d137d2
commit 527825fa57
Signed by: l3d
GPG key ID: CD08445BFF4313D1
6 changed files with 72 additions and 45 deletions

View file

@ -10,14 +10,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: 'checkout git repo' - name: Checkout git repo
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
lfs: true submodules: true
submodules: false
fetch-depth: 0 fetch-depth: 0
- name: 'Lint Ansible Playbook' - name: Run ansible-lint
uses: ansible/ansible-lint-action@v6 uses: ansible-actions/ansible-lint-action@v1.0.2
with: with:
path: "." target: "./"

View file

@ -1,22 +1,24 @@
--- ---
name: Galaxy release name: Galaxy-NG Roles Import
# yamllint disable-line rule:truthy # yamllint disable-line rule:truthy
on: on:
push:
branches: ['main']
release: release:
types: ['created'] types: ['created']
jobs: jobs:
build: build:
name: Galaxy Role Importer
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps:
- name: 'checkout git repo'
uses: actions/checkout@v4
- name: 'release on galaxy' steps:
uses: robertdebock/galaxy-action@1.2.1 - name: 'Checkout git repo'
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: 'Release on galaxy'
uses: ansible-actions/ansible-galaxy-action@v1.0.1
with: with:
galaxy_api_key: ${{ secrets.galaxy_api_key }} galaxy_api_key: ${{ secrets.galaxy_api_key }}
git_branch: 'main'

22
.github/workflows/j2lint-check.yml vendored Normal file
View file

@ -0,0 +1,22 @@
---
name: Jinja2 Linting check
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
name: Jinja2 Linting
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Run j2lint
uses: ansible-actions/j2lint-action@v0.0.1
with:
target: "./"

22
.github/workflows/yamllint-check.yml vendored Normal file
View file

@ -0,0 +1,22 @@
---
name: Yamllint check
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
name: Yamllint
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Run yamllint
uses: ansible-actions/yamllint-action@v0.0.1
with:
target: "./"

View file

@ -1,23 +0,0 @@
---
name: 'Yamllint GitHub Actions'
# yamllint disable-line rule:truthy
on:
push:
branches: '*'
pull_request:
branches: '*'
jobs:
yamllint:
name: 'Yamllint'
runs-on: ubuntu-latest
steps:
- name: 'checkout git repo'
uses: actions/checkout@v4
- name: 'Yamllint'
uses: karancode/yamllint-github-action@v2.1.1
with:
yamllint_file_or_dir: '.'
yamllint_config_filepath: './.yamllint'

View file

@ -5,7 +5,7 @@ set $term {{ i3_terminal }}
# Font for window titles. Will also be used by the bar unless a different font # Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. # is used in the bar {} block below.
font pango:monospace {{ i3_font_size }} font pango:monospace {{ i3_font_size }}
focus_follows_mouse {% if i3_focus_follows_mouse | bool %}yes{% else %}no{% endif %} focus_follows_mouse {{ i3_focus_follows_mouse | tenary('yes', 'no' ) }}
# Use Mouse+$mod to drag floating windows to their wanted position # Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod floating_modifier $mod
@ -27,7 +27,7 @@ bindsym $mod+Shift+q kill
{% if ansible_distribution == 'Redhat' or ansible_distribution == 'CentOS' %} {% if ansible_distribution == 'Redhat' or ansible_distribution == 'CentOS' %}
# bindsym $mod+d exec dmenu_run (a program launcher) # bindsym $mod+d exec dmenu_run (a program launcher)
bindsym $mod+d exec dmenu_run bindsym $mod+d exec dmenu_run
{%- else -%} {% else %}
bindsym $mod+d exec rofi -show run bindsym $mod+d exec rofi -show run
# bindsym $mod+d exec rofi (a program launcher) # bindsym $mod+d exec rofi (a program launcher)
bindsym $mod+Shift+d exec rofi -show drun bindsym $mod+Shift+d exec rofi -show drun
@ -170,7 +170,13 @@ bar {
} }
# Setup Monitors # Setup Monitors
exec_always sleep 1 && xrandr {% for monitor in i3_monitors %} --output {{ monitor.output }} --mode {{ monitor.mode }} --pos {{ monitor.pos }} --rotate {{ monitor.rotate }} {% endfor %} exec_always sleep 1 && xrandr \
{% for monitor in i3_monitors %} \
--output {{ monitor.output }} \
--mode {{ monitor.mode }} \
--pos {{ monitor.pos }} \
--rotate {{ monitor.rotate }}
{% endfor %}
# Background # Background
{% if i3_desktop_background is defined %} {% if i3_desktop_background is defined %}
@ -200,4 +206,3 @@ exec sleep 4 && {{ app }}
{% for keybinding in i3_keybindings %} {% for keybinding in i3_keybindings %}
bindsym {{ keybinding.key }} exec {{ keybinding.exec }} bindsym {{ keybinding.key }} exec {{ keybinding.exec }}
{% endfor %} {% endfor %}