Improve GitHub action (#2364)

* Add YAML linter

* Drop GitHub registry login as its not required at this point

* Add YAML document start marker

* Fix YAMLlint issues

* Fix YAMLlint issues in .github yaml files

* Fix YAMLlint issue in .github/dependabot.yml

* Remove .github/move.yml

* Set dependabot to weekly

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>

* Use YAML strip option where appropriate

* Fix multiline string

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
This commit is contained in:
Stefan Agner
2022-04-11 09:00:11 +02:00
committed by GitHub
parent 4cd2e8846a
commit c7a5f7c0aa
55 changed files with 96 additions and 47 deletions

View File

@@ -1,3 +1,5 @@
---
# yamllint disable rule:line-length rule:truthy
name: Build add-on
env:
@@ -103,14 +105,6 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
if: env.BUILD_ARGS == '--docker-hub-check'
uses: docker/login-action@v1.14.1
with:
registry: ghcr.io
username: ${{ secrets.GIT_USER }}
password: ${{ secrets.GIT_TOKEN }}
- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/builder@2022.03.1

View File

@@ -1,3 +1,5 @@
---
# yamllint disable rule:truthy
name: Lint
env:
@@ -29,17 +31,15 @@ jobs:
hadolint/hadolint:${{ env.HADOLINT_VERSION }} < "$dockerfile"
done
jq:
yamllint:
runs-on: ubuntu-latest
name: JQ
name: YAMLLint
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Run linter
run: |
shopt -s globstar
cat **/*.json | jq '.'
- name: Run YAMLLint
uses: frenck/action-yamllint@v1.1
shellcheck:
runs-on: ubuntu-latest
@@ -49,4 +49,4 @@ jobs:
uses: actions/checkout@v3
- name: Run linter
uses: ludeeus/action-shellcheck@1.1.0
uses: ludeeus/action-shellcheck@1.1.0

View File

@@ -1,3 +1,5 @@
---
# yamllint disable rule:truthy
name: Stale
on:
@@ -20,6 +22,6 @@ jobs:
stale-issue-label: "stale"
exempt-issue-labels: "pinned,security,Help wanted"
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
This issue has been automatically marked as stale because it has
not had recent activity. It will be closed if no further activity
occurs. Thank you for your contributions.