Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

[syncthing] Mount all dirs into add-on container #525

[syncthing] Mount all dirs into add-on container

[syncthing] Mount all dirs into add-on container #525

Workflow file for this run

name: Lint Checks
on:
pull_request:
branches:
- main
- dev
push:
branches:
- dev
jobs:
check-addon-changes:
runs-on: ubuntu-latest
outputs:
changedAddons: ${{ steps.filter.outputs.changes }}
changedDockerfiles: ${{ steps.changed-files.outputs.dockerfile_files }}
steps:
- name: ↩️ Checkout
uses: actions/checkout@v4
- name: 📂 Detect chanced addons
uses: dorny/paths-filter@v2
id: filter
with:
filters: .github/paths-filter.yml
- name: 📂 Detect chanced files
uses: dorny/paths-filter@v2
id: changed-files
with:
list-files: csv
filters: |
dockerfile:
- '**/Dockerfile.md'
addon-linter:
name: Addon linting
if: ${{ needs.check-addon-changes.outputs.changedAddons != '[]' }}
runs-on: ubuntu-latest
needs: check-addon-changes
strategy:
fail-fast: false
matrix:
addon: ${{ fromJSON(needs.check-addon-changes.outputs.changedAddons) }}
steps:
- name: ↩️ Checkout
uses: actions/checkout@v4
- name: 🔎 Run Home Assistant Add-on Lint
uses: frenck/action-addon-linter@v2
with:
path: "./${{ matrix.addon }}"
hadolint:
runs-on: ubuntu-latest
container: ghcr.io/hadolint/hadolint:latest-alpine
steps:
- name: ↩️ Checkout
uses: actions/checkout@v4
- name: 🔎 Run hadolint
if: steps.filter.outputs.dockerfile == 'true'
run: hadolint ${{ needs.check-addon-changes.outputs.changedDockerfiles }}
shellcheck:
runs-on: ubuntu-latest
steps:
- name: ↩️ Checkout
uses: actions/checkout@v4
- name: 📂 Detect chanced files
id: filter
uses: dorny/[email protected]
with:
list-files: 'shell'
filters: |
shell:
- '**/*.sh'
- '**/cont-init.d/*'
- '**/services.d/*'
- name: 🔎 Run ShellCheck
if: steps.filter.outputs.shell == 'true'
uses: ludeeus/[email protected]
with:
additional_files: ${{ steps.filter.outputs.shell_files }}
markdownlint:
runs-on: ubuntu-latest
steps:
- name: ↩️ Checkout
uses: actions/checkout@v4
- name: 🔎 Run markdownlint
uses: nosborn/[email protected]
with:
files: .