Skip to content

Limit cpu usage

Limit cpu usage #253

Workflow file for this run

name: Lint
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
yaml:
name: Lint YAML lints
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/[email protected]
- name: 🚀 Run YAML lint
uses: frenck/[email protected]
find:
name: Find add-ons
runs-on: ubuntu-latest
outputs:
addons: ${{ steps.addons.outputs.addons_list }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/[email protected]
- name: 🔍 Find add-on directories
id: addons
uses: home-assistant/actions/helpers/find-addons@master
lint:
name: Lint add-on ${{ matrix.path }}
runs-on: ubuntu-latest
needs: find
strategy:
matrix:
path: ${{ fromJson(needs.find.outputs.addons) }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/[email protected]
- name: 🚀 Run Home Assistant Add-on Lint
uses: frenck/[email protected]
with:
path: "./${{ matrix.path }}"
docker:
name: Lint add-on ${{ matrix.path }} docker image
runs-on: ubuntu-latest
needs: find
strategy:
matrix:
path: ${{ fromJson(needs.find.outputs.addons) }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/[email protected]
- name: 🚀 Run Hadolint
uses: brpaz/[email protected]
with:
dockerfile: "./${{ matrix.path }}/Dockerfile"
shell:
name: Lint add-on ${{ matrix.path }} shell scripts
runs-on: ubuntu-latest
needs: find
strategy:
matrix:
path: ${{ fromJson(needs.find.outputs.addons) }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/[email protected]
- name: 🚀 Run Shellcheck
uses: ludeeus/[email protected]
with:
scandir: "./${{ matrix.path }}"
env:
SHELLCHECK_OPTS: -s bash