⬆️ Update release-drafter/release-drafter action to v7 #820
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Lint | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| 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@v6.0.2 | |
| - 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@v6.0.2 | |
| - name: 🚀 Run Home Assistant Add-on Lint | |
| uses: frenck/action-addon-linter@v2.21 | |
| with: | |
| path: "./${{ matrix.path }}" | |
| lint-hadolint: | |
| name: Hadolint | |
| needs: find | |
| strategy: | |
| matrix: | |
| path: ${{ fromJson(needs.find.outputs.addons) }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⤵️ Check out code from GitHub | |
| uses: actions/checkout@v6 | |
| - name: 🚀 Run Hadolint | |
| uses: brpaz/hadolint-action@v1.5.0 | |
| with: | |
| dockerfile: "./${{ matrix.path }}/Dockerfile" | |
| lint-json: | |
| name: JSON Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⤵️ Check out code from GitHub | |
| uses: actions/checkout@v6 | |
| - name: 🚀 Run JQ | |
| run: | | |
| shopt -s globstar | |
| cat **/*.json | jq '.' | |
| lint-shellcheck: | |
| name: Shellcheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⤵️ Check out code from GitHub | |
| uses: actions/checkout@v6 | |
| - 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@v6 | |
| - name: 🚀 Run YAMLLint | |
| uses: frenck/action-yamllint@v1.5 | |
| lint-prettier: | |
| name: Prettier | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⤵️ Check out code from GitHub | |
| uses: actions/checkout@v6 | |
| - name: 🚀 Run Prettier | |
| uses: creyD/prettier_action@v4.6 | |
| with: | |
| prettier_options: --write **/*.{json,js,md,yaml} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |