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:
parent
63b8d137d2
commit
527825fa57
6 changed files with 72 additions and 45 deletions
11
.github/workflows/ansible-linting-check.yml
vendored
11
.github/workflows/ansible-linting-check.yml
vendored
|
@ -10,14 +10,13 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
- name: Checkout git repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
submodules: false
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 'Lint Ansible Playbook'
|
||||
uses: ansible/ansible-lint-action@v6
|
||||
- name: Run ansible-lint
|
||||
uses: ansible-actions/ansible-lint-action@v1.0.2
|
||||
with:
|
||||
path: "."
|
||||
target: "./"
|
||||
|
|
20
.github/workflows/galaxy.yml
vendored
20
.github/workflows/galaxy.yml
vendored
|
@ -1,22 +1,24 @@
|
|||
---
|
||||
name: Galaxy release
|
||||
name: Galaxy-NG Roles Import
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
push:
|
||||
branches: ['main']
|
||||
release:
|
||||
types: ['created']
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Galaxy Role Importer
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 'release on galaxy'
|
||||
uses: robertdebock/galaxy-action@1.2.1
|
||||
steps:
|
||||
- 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:
|
||||
galaxy_api_key: ${{ secrets.galaxy_api_key }}
|
||||
git_branch: 'main'
|
||||
|
|
22
.github/workflows/j2lint-check.yml
vendored
Normal file
22
.github/workflows/j2lint-check.yml
vendored
Normal 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
22
.github/workflows/yamllint-check.yml
vendored
Normal 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: "./"
|
23
.github/workflows/yamllint.yaml
vendored
23
.github/workflows/yamllint.yaml
vendored
|
@ -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'
|
|
@ -5,7 +5,7 @@ set $term {{ i3_terminal }}
|
|||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
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
|
||||
floating_modifier $mod
|
||||
|
@ -27,7 +27,7 @@ bindsym $mod+Shift+q kill
|
|||
{% if ansible_distribution == 'Redhat' or ansible_distribution == 'CentOS' %}
|
||||
# bindsym $mod+d exec dmenu_run (a program launcher)
|
||||
bindsym $mod+d exec dmenu_run
|
||||
{%- else -%}
|
||||
{% else %}
|
||||
bindsym $mod+d exec rofi -show run
|
||||
# bindsym $mod+d exec rofi (a program launcher)
|
||||
bindsym $mod+Shift+d exec rofi -show drun
|
||||
|
@ -114,9 +114,9 @@ bindsym $mod+Shift+{{ workspace.id }} move container to workspace $workspace{{ w
|
|||
{% endfor %}
|
||||
|
||||
{% for monitor in i3_monitors %}
|
||||
{% for workspace in monitor.workspaces %}
|
||||
{% for workspace in monitor.workspaces %}
|
||||
workspace $workspace{{ workspace }} output {{ monitor.output }}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% for application in i3_applications %}
|
||||
|
@ -170,7 +170,13 @@ bar {
|
|||
}
|
||||
|
||||
# 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
|
||||
{% if i3_desktop_background is defined %}
|
||||
|
@ -199,5 +205,4 @@ exec sleep 4 && {{ app }}
|
|||
# Register Keybindings
|
||||
{% for keybinding in i3_keybindings %}
|
||||
bindsym {{ keybinding.key }} exec {{ keybinding.exec }}
|
||||
{% endfor%}
|
||||
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue