Cleanup CI

This commit is contained in:
Etienne G
2023-08-15 01:59:41 +10:00
parent ea576a90f2
commit 61ed46ba32
4 changed files with 28 additions and 89 deletions
+16
View File
@@ -0,0 +1,16 @@
---
name: CI
# yamllint disable-line rule:truthy
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:
jobs:
workflows:
uses: hassio-addons/workflows/.github/workflows/addon-ci.yaml@main
-43
View File
@@ -1,43 +0,0 @@
---
name: Addons lint
# yamllint disable-line rule:truthy
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 0 * * *"
jobs:
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/checkout@v3.5.3
- 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/checkout@v3.5.3
- name: 🚀 Run Home Assistant Add-on Lint
uses: frenck/action-addon-linter@v2.13
with:
path: "./${{ matrix.path }}"
+12
View File
@@ -0,0 +1,12 @@
---
name: Release Drafter
# yamllint disable-line rule:truthy
on:
push:
branches:
- main
jobs:
workflows:
uses: hassio-addons/workflows/.github/workflows/release-drafter.yaml@main
-46
View File
@@ -1,46 +0,0 @@
---
name: Workflows CI
# yamllint disable-line rule:truthy
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:
jobs:
lint-shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3
- name: 🚀 Run Shellcheck
uses: ludeeus/action-shellcheck@2.0.0
env:
SHELLCHECK_OPTS: -s bash
lint-yamllint:
name: YAMLLint
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3
- name: 🚀 Run YAMLLint
uses: frenck/action-yamllint@v1.4
lint-prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3
- name: 🚀 Run Prettier
uses: creyD/prettier_action@v4.3
with:
prettier_options: --write **/*.{json,js,md,yaml}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}