Skip to content

Commit

Permalink
Improve GitHub action (home-assistant#2364)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Use YAML strip option where appropriate

* Fix multiline string

Co-authored-by: Joakim Sørensen <[email protected]>
  • Loading branch information
agners and ludeeus authored Apr 11, 2022
1 parent 4cd2e88 commit c7a5f7c
Show file tree
Hide file tree
Showing 55 changed files with 96 additions and 47 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
# yamllint disable rule:line-length
name: Bug Report Form
description: Report an issue related to one of the official add-ons.
body:
Expand Down
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
# yamllint disable rule:line-length
blank_issues_enabled: false
contact_links:
- name: Report a bug with the UI, Frontend or Lovelace
Expand All @@ -17,4 +19,4 @@ contact_links:
about: Please use our Community Forum for making feature requests.
- name: I'm unsure where to go
url: https://www.home-assistant.io/join-chat
about: If you are unsure where to go, then joining our chat is recommended; Just ask!
about: If you are unsure where to go, then joining our chat is recommended; Just ask!
13 changes: 7 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "06:00"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
time: "06:00"
open-pull-requests-limit: 10
13 changes: 0 additions & 13 deletions .github/move.yml

This file was deleted.

10 changes: 2 additions & 8 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
# yamllint disable rule:line-length rule:truthy
name: Build add-on

env:
Expand Down Expand Up @@ -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/[email protected]
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/[email protected]
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
# yamllint disable rule:truthy
name: Lint

env:
Expand Down Expand Up @@ -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/[email protected]

shellcheck:
runs-on: ubuntu-latest
Expand All @@ -49,4 +49,4 @@ jobs:
uses: actions/checkout@v3

- name: Run linter
uses: ludeeus/[email protected]
uses: ludeeus/[email protected]
8 changes: 5 additions & 3 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
# yamllint disable rule:truthy
name: Stale

on:
Expand All @@ -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.
1 change: 1 addition & 0 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
ignored:
- DL3003
- DL3006
Expand Down
1 change: 1 addition & 0 deletions ada/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
amd64: ghcr.io/home-assistant/amd64-base-debian:bullseye
armhf: ghcr.io/home-assistant/armhf-base-debian:bullseye
Expand Down
1 change: 1 addition & 0 deletions ada/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 1.2.0
slug: ada
name: Hey Ada!
Expand Down
1 change: 1 addition & 0 deletions almond/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base-debian:buster
amd64: ghcr.io/home-assistant/amd64-base-debian:buster
Expand Down
1 change: 1 addition & 0 deletions almond/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2.0.1
slug: almond
name: Almond
Expand Down
1 change: 1 addition & 0 deletions cec_scan/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.14
amd64: ghcr.io/home-assistant/amd64-base:3.14
Expand Down
1 change: 1 addition & 0 deletions cec_scan/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: "3.0"
slug: cec_scan
name: CEC Scanner
Expand Down
1 change: 1 addition & 0 deletions check_config/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2022.02.0
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2022.02.0
Expand Down
1 change: 1 addition & 0 deletions check_config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 3.10.0
slug: check_config
name: Check Home Assistant configuration
Expand Down
5 changes: 4 additions & 1 deletion check_config/translations/en.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
configuration:
version:
name: Version
description: The version of Home Assistant to check against, you can use `stable` , `beta`, `dev` or a specific version
description: >-
The version of Home Assistant to check against, you can use `stable`,
`beta`, `dev` or a specific version
1 change: 1 addition & 0 deletions configurator/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.14
amd64: ghcr.io/home-assistant/amd64-base:3.14
Expand Down
1 change: 1 addition & 0 deletions configurator/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 5.3.3
slug: configurator
name: File editor
Expand Down
1 change: 1 addition & 0 deletions deconz/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base-debian:buster
amd64: ghcr.io/home-assistant/amd64-base-debian:buster
Expand Down
4 changes: 3 additions & 1 deletion deconz/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
version: 6.12.0
slug: deconz
name: deCONZ
description: Control a Zigbee network with ConBee or RaspBee by Dresden Elektronik
description: >-
Control a Zigbee network with ConBee or RaspBee by Dresden Elektronik.
url: https://github.com/home-assistant/hassio-addons/tree/master/deconz
apparmor: false
arch:
Expand Down
1 change: 1 addition & 0 deletions dhcp_server/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.14
amd64: ghcr.io/home-assistant/amd64-base:3.14
Expand Down
1 change: 1 addition & 0 deletions dhcp_server/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: "1.2"
slug: dhcp_server
name: DHCP server
Expand Down
1 change: 1 addition & 0 deletions dnsmasq/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.13
amd64: ghcr.io/home-assistant/amd64-base:3.13
Expand Down
1 change: 1 addition & 0 deletions dnsmasq/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 1.4.4
slug: dnsmasq
name: Dnsmasq
Expand Down
1 change: 1 addition & 0 deletions duckdns/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.14
amd64: ghcr.io/home-assistant/amd64-base:3.14
Expand Down
4 changes: 3 additions & 1 deletion duckdns/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
version: 1.14.0
slug: duckdns
name: Duck DNS
description: Free Dynamic DNS (DynDNS or DDNS) service with Let's Encrypt support
description: >-
Free Dynamic DNS (DynDNS or DDNS) service with Let's Encrypt support
url: https://github.com/home-assistant/hassio-addons/tree/master/duckdns
arch:
- armhf
Expand Down
1 change: 1 addition & 0 deletions git_pull/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.13
amd64: ghcr.io/home-assistant/amd64-base:3.13
Expand Down
1 change: 1 addition & 0 deletions git_pull/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 7.13.1
slug: git_pull
name: Git pull
Expand Down
1 change: 1 addition & 0 deletions google_assistant/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
amd64: ghcr.io/home-assistant/amd64-base-debian:buster
armhf: ghcr.io/home-assistant/armhf-base-debian:buster
Expand Down
4 changes: 3 additions & 1 deletion google_assistant/config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
version: 2.5.0
slug: google_assistant
name: Google Assistant SDK
description: A virtual personal assistant developed by Google
url: https://github.com/home-assistant/hassio-addons/tree/master/google_assistant
url: >-
https://github.com/home-assistant/hassio-addons/tree/master/google_assistant
advanced: true
arch:
- armhf
Expand Down
1 change: 1 addition & 0 deletions homematic/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
armv7: ghcr.io/home-assistant/armv7-base-debian:bullseye
i386: ghcr.io/home-assistant/i386-base-debian:bullseye
Expand Down
1 change: 1 addition & 0 deletions homematic/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 99.0.5
slug: homematic
name: HomeMatic CCU
Expand Down
1 change: 1 addition & 0 deletions letsencrypt/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base-python:3.9-alpine3.14
amd64: ghcr.io/home-assistant/amd64-base-python:3.9-alpine3.14
Expand Down
7 changes: 6 additions & 1 deletion letsencrypt/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 4.12.0
slug: letsencrypt
name: Let's Encrypt
Expand Down Expand Up @@ -66,7 +67,11 @@ schema:
ovh_consumer_key: str?
ovh_endpoint: str?
propagation_seconds: int(60,3600)?
provider: list(dns-cloudflare|dns-cloudxns|dns-digitalocean|dns-directadmin|dns-dnsimple|dns-dnsmadeeasy|dns-gehirn|dns-google|dns-linode|dns-luadns|dns-njalla|dns-nsone|dns-ovh|dns-rfc2136|dns-route53|dns-sakuracloud|dns-netcup|dns-gandi|dns-transip)?
provider: "list(dns-cloudflare|dns-cloudxns|dns-digitalocean|\
dns-directadmin|dns-dnsimple|dns-dnsmadeeasy|dns-gehirn|\
dns-google|dns-linode|dns-luadns|dns-njalla|dns-nsone|dns-ovh|\
dns-rfc2136|dns-route53|dns-sakuracloud|dns-netcup|dns-gandi|\
dns-transip)?"
rfc2136_algorithm: str?
rfc2136_name: str?
rfc2136_port: str?
Expand Down
1 change: 1 addition & 0 deletions mariadb/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.12
amd64: ghcr.io/home-assistant/amd64-base:3.12
Expand Down
6 changes: 4 additions & 2 deletions mariadb/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2.4.0
slug: mariadb
name: MariaDB
Expand Down Expand Up @@ -33,8 +34,9 @@ schema:
rights:
- database: str
privileges:
- list(ALTER|CREATE|CREATE ROUTINE|CREATE TEMPORARY TABLES|CREATE VIEW|DELETE|DELETE
HISTORY|DROP|EVENT|GRANT OPTION|INDEX|INSERT|LOCK TABLES|SELECT|SHOW VIEW|TRIGGER|UPDATE)?
- "list(ALTER|CREATE|CREATE ROUTINE|CREATE TEMPORARY TABLES|\
CREATE VIEW|DELETE|DELETE HISTORY|DROP|EVENT|GRANT OPTION|INDEX|\
INSERT|LOCK TABLES|SELECT|SHOW VIEW|TRIGGER|UPDATE)?"
username: str
services:
- mysql:provide
Expand Down
1 change: 1 addition & 0 deletions mosquitto/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.13
amd64: ghcr.io/home-assistant/amd64-base:3.13
Expand Down
1 change: 1 addition & 0 deletions mosquitto/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 6.0.1
slug: mosquitto
name: Mosquitto broker
Expand Down
1 change: 1 addition & 0 deletions nginx_proxy/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.14
amd64: ghcr.io/home-assistant/amd64-base:3.14
Expand Down
1 change: 1 addition & 0 deletions nginx_proxy/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 3.1.1
hassio_api: true
slug: nginx_proxy
Expand Down
1 change: 1 addition & 0 deletions rpc_shutdown/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.14
amd64: ghcr.io/home-assistant/amd64-base:3.14
Expand Down
1 change: 1 addition & 0 deletions rpc_shutdown/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: "2.2"
slug: rpc_shutdown
name: RPC Shutdown
Expand Down
1 change: 1 addition & 0 deletions samba/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.13
amd64: ghcr.io/home-assistant/amd64-base:3.13
Expand Down
1 change: 1 addition & 0 deletions samba/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 9.5.1
slug: samba
name: Samba share
Expand Down
1 change: 1 addition & 0 deletions ssh/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.14
amd64: ghcr.io/home-assistant/amd64-base:3.14
Expand Down
1 change: 1 addition & 0 deletions ssh/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 9.3.0
slug: ssh
name: Terminal & SSH
Expand Down
1 change: 1 addition & 0 deletions tellstick/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.13
amd64: ghcr.io/home-assistant/amd64-base:3.13
Expand Down
8 changes: 6 additions & 2 deletions tellstick/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2.1.0
slug: tellstick
name: TellStick
Expand Down Expand Up @@ -30,9 +31,12 @@ schema:
fade: str?
house: str?
id: int(1,)
model: match(codeswitch|bell|selflearning-switch|selflearning-dimmer|selflearning|ecosavers|kp100|temperaturehumidity|temperature)?
model: "match(codeswitch|bell|selflearning-switch|selflearning-dimmer|\
selflearning|ecosavers|kp100|temperaturehumidity|temperature)?"
name: str
protocol: match(arctech|brateck|comen|everflourish|fineoffset|fuhaote|hasta|ikea|kangtai|mandolyn|oregon|risingsun|sartano|silvanchip|upm|waveman|x10|yidong)
protocol: "match(arctech|brateck|comen|everflourish|fineoffset|fuhaote|\
hasta|ikea|kangtai|mandolyn|oregon|risingsun|sartano|\
silvanchip|upm|waveman|x10|yidong)"
unit: str?
startup: system
stdin: true
Expand Down
1 change: 1 addition & 0 deletions vlc/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base:3.13
amd64: ghcr.io/home-assistant/amd64-base:3.13
Expand Down
Loading

0 comments on commit c7a5f7c

Please sign in to comment.