From 61ed46ba32e56852f8aea033131e04d9abe6a82a Mon Sep 17 00:00:00 2001 From: Etienne G Date: Tue, 15 Aug 2023 01:59:41 +1000 Subject: [PATCH] Cleanup CI --- .github/workflows/addon-ci.yaml | 16 +++++++++ .github/workflows/addon-lint.yaml | 43 ------------------------ .github/workflows/release-drafter.yaml | 12 +++++++ .github/workflows/workflows-ci.yaml | 46 -------------------------- 4 files changed, 28 insertions(+), 89 deletions(-) create mode 100644 .github/workflows/addon-ci.yaml delete mode 100644 .github/workflows/addon-lint.yaml create mode 100644 .github/workflows/release-drafter.yaml delete mode 100644 .github/workflows/workflows-ci.yaml diff --git a/.github/workflows/addon-ci.yaml b/.github/workflows/addon-ci.yaml new file mode 100644 index 0000000..60ce9a5 --- /dev/null +++ b/.github/workflows/addon-ci.yaml @@ -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 diff --git a/.github/workflows/addon-lint.yaml b/.github/workflows/addon-lint.yaml deleted file mode 100644 index 787fa75..0000000 --- a/.github/workflows/addon-lint.yaml +++ /dev/null @@ -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 }}" diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yaml new file mode 100644 index 0000000..5769e10 --- /dev/null +++ b/.github/workflows/release-drafter.yaml @@ -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 diff --git a/.github/workflows/workflows-ci.yaml b/.github/workflows/workflows-ci.yaml deleted file mode 100644 index 12eaeb0..0000000 --- a/.github/workflows/workflows-ci.yaml +++ /dev/null @@ -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 }}