mirror of
https://github.com/aljazceru/addons.git
synced 2026-02-08 06:34:20 +01:00
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:
10
.github/workflows/builder.yml
vendored
10
.github/workflows/builder.yml
vendored
@@ -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
|
||||
|
||||
14
.github/workflows/lint.yml
vendored
14
.github/workflows/lint.yml
vendored
@@ -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
|
||||
|
||||
8
.github/workflows/stale.yml
vendored
8
.github/workflows/stale.yml
vendored
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user