Skip to content

Commit

Permalink
Merge branch 'master' into dezihh-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
dezihh authored Sep 7, 2024
2 parents 6174b9e + 264213a commit 450badb
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 90 deletions.
88 changes: 27 additions & 61 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: "Checks"
name: Check

on:
pull_request:
types:
Expand All @@ -10,31 +11,29 @@ on:
- master
paths:
- appdaemon
- blacklist
- critical
- integration
- netdaemon
- plugin
- python_script
- removed
- template
- theme

concurrency:
group: checks-${{ github.ref }}
cancel-in-progress: true

permissions: {}

jobs:
preflight:
runs-on: ubuntu-latest
name: Initialize
name: Preflight
outputs:
repository: ${{ steps.repository.outputs.repository }}
category: ${{ steps.category.outputs.category }}
removal: ${{ steps.removal.outputs.removal }}
steps:
- name: Check out repository
uses: actions/[email protected].1
uses: actions/[email protected].7

- name: Clone origin
run: git clone --depth 1 https://github.com/hacs/default /tmp/repositories/default
Expand All @@ -43,45 +42,25 @@ jobs:
id: repository
run: echo "repository=$(python3 -m scripts.changed.repo)" >> $GITHUB_OUTPUT

- name: Set category
id: category
run: echo "category=$(python3 -m scripts.changed.category)" >> $GITHUB_OUTPUT

- name: Check removal
id: removal
run: |
if [ "${{ steps.repository.outputs.repository }}" == "Bad data []" ]; then
echo "removal=true" >> $GITHUB_OUTPUT
fi
- name: Set category
if: steps.removal.outputs.removal != 'true'
id: category
run: echo "category=$(python3 -m scripts.changed.category)" >> $GITHUB_OUTPUT

- name: Clone new addition
if: steps.removal.outputs.removal != 'true'
run: |
repo=$(python3 -m scripts.changed.repo)
git clone --depth 1 "https://github.com/$repo" /tmp/repositories/addition
- name: Upload shared artifacts
if: steps.removal.outputs.removal != 'true'
uses: actions/upload-artifact@v3
with:
name: repositories
path: /tmp/repositories

owner:
runs-on: ubuntu-latest
name: Check Owner
name: Owner
needs: preflight
if: needs.preflight.outputs.removal != 'true'
steps:
- name: Check out repository
uses: actions/[email protected]

- name: Download shared artifacts
uses: actions/download-artifact@v3
with:
name: repositories
path: /tmp/repositories
uses: actions/[email protected]

- name: Install dependencies if needed
run: scripts/setup
Expand All @@ -90,63 +69,50 @@ jobs:
run: python3 -m scripts.check.owner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY: ${{needs.preflight.outputs.repository}}

edits:
editable:
runs-on: ubuntu-latest
name: Check if PR is editable
name: Editable PR
steps:
- name: Check out repository
uses: actions/[email protected].1
uses: actions/[email protected].7

- name: Install dependencies if needed
run: scripts/setup

- name: Run the check
run: python3 -m scripts.check.edits


hassfest:
runs-on: ubuntu-latest
name: "Check hassfest"
name: Hassfest
needs: preflight
if: needs.preflight.outputs.category == 'integration'
if: needs.preflight.outputs.category == 'integration' && needs.preflight.outputs.removal != 'true'
steps:
- name: Check out repository
uses: actions/[email protected].1
uses: actions/[email protected].7

- name: Download shared artifacts
uses: actions/download-artifact@v3
with:
name: repositories
path: /tmp/repositories

- name: Get hassfest action
- name: Clone new addition
run: |
git clone --depth 1 https://github.com/home-assistant/actions.git /tmp/actions
echo "::add-matcher::/tmp/actions/hassfest/problem-matcher.json"
- name: Enable problem-matcher
run: echo "::add-matcher::/tmp/actions/hassfest/problem-matcher.json"

- name: Build hassfest
run: docker build /tmp/actions/hassfest -f /tmp/actions/hassfest/Dockerfile -t hassfest
git clone --depth 1 "https://github.com/${{needs.preflight.outputs.repository}}" /tmp/repositories/addition
- name: Run hassfest
run: |
integration=$(python3 -m scripts.helpers.integration_path)
domain=$(python3 -m scripts.helpers.domain)
docker run \
--rm \
docker run --rm \
-v "$integration":"/github/workspace/$domain" \
hassfest
ghcr.io/home-assistant/hassfest:latest
hacs:
runs-on: ubuntu-latest
name: "Run HACS Action"
name: HACS action
needs: preflight
if: needs.preflight.outputs.removal != 'true'
steps:
- name: HACS action
uses: "hacs/action@main"
uses: hacs/action@main
with:
repository: ${{needs.preflight.outputs.repository}}
category: ${{needs.preflight.outputs.category}}
category: ${{needs.preflight.outputs.category}}
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/[email protected].1
uses: actions/[email protected].7

- name: Validate
run: jq --raw-output . appdaemon blacklist critical integration netdaemon plugin python_script removed template theme
Expand All @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/[email protected].1
uses: actions/[email protected].7

- name: Critical
uses: cardinalby/[email protected]
Expand All @@ -52,7 +52,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/[email protected].1
uses: actions/[email protected].7

- name: Check lists
run: python3 scripts/is_sorted.py
6 changes: 3 additions & 3 deletions .github/workflows/upload-critical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: Upload
steps:
- name: Checkout the repository
uses: actions/[email protected].1
uses: actions/[email protected].7

- name: Validate with JSON schema
uses: cardinalby/[email protected]
Expand All @@ -27,7 +27,7 @@ jobs:
schema: 'tools/jsonschema/critical.schema.json'

- name: Set up Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.2.0
id: python
with:
python-version: "3.x"
Expand All @@ -46,7 +46,7 @@ jobs:
jq -c '[.[].repository]' < critical > upload/critical/repositories.json
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: critical
path: upload/critical
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upload-removed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: Upload
steps:
- name: Checkout the repository
uses: actions/[email protected].1
uses: actions/[email protected].7

- name: Validate with JSON schema
uses: cardinalby/[email protected]
Expand All @@ -27,7 +27,7 @@ jobs:
schema: 'tools/jsonschema/removed.schema.json'

- name: Set up Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.2.0
id: python
with:
python-version: "3.x"
Expand All @@ -46,7 +46,7 @@ jobs:
jq -c '[.[].repository]' < removed > upload/removed/repositories.json
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: removed
path: upload/removed
Expand Down
7 changes: 7 additions & 0 deletions blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"amaximus/bkk_stop_card",
"amelchio/logbook_cache",
"And3rsL/Deebot-for-Home-Assistant",
"andrew-codechimp/HA-Mastodon-Profile-Stats",
"Armaell/home-assistant-custom-icons-loader",
"atomic7777/atomic_calendar",
"au190/au190_bkk_stop_card",
Expand Down Expand Up @@ -130,6 +131,7 @@
"dr1rrb/ha-twinkly",
"DSorlov/hasl-platform",
"dummylabs/watchman",
"dynasticorpheus/gigasetelements-ha",
"eavanvalkenburg/sia",
"echoromeo/hanobo",
"edenhaus/ha-prosenic",
Expand Down Expand Up @@ -189,6 +191,7 @@
"mac-zhou/midea-ac-py",
"mammuth/ha-fritzbox-tools",
"mampfes/hacs_wiffi",
"marcokreeft87/room-card",
"marcomow/ble-bulb-card",
"marrobHD/firetv-card",
"MatthewFlamm/nwsradar",
Expand All @@ -205,6 +208,7 @@
"Mr-Groch/HA-Emulated-Color-Temp-Light",
"MTrab/clever",
"nagyrobi/home-assistant-custom-components-cover-rf-time-based",
"nagyrobi/home-assistant-custom-components-linkplay",
"nagyrobi/home-assistant-custom-components-pfsense-gateways",
"natekspencer/hacs-litterrobot",
"NemesisRE/lovelace-swipe-navigation",
Expand Down Expand Up @@ -252,6 +256,8 @@
"ryannazaretian/hacs-nexia-climate-integration",
"ryanwinter/hass-rainforest-emu-2",
"safepay/cover.hd_powerview",
"safepay/sensor.fronius",
"safepay/sensor.willyweather",
"sakowicz/home-assistant-tenda-tracker",
"sdebruyn/homeassistant-bpost-integration",
"SebuZet/samsungrac",
Expand Down Expand Up @@ -282,6 +288,7 @@
"Villhellm/custom-sidebar",
"Villhellm/lovelace-animated-background",
"walthowd/ha-automower",
"websylv/homeassistant-meteoswiss",
"WillowMist/sensor.mylar",
"WolfRevo/climate.spzb0001_thermostat",
"xannor/ha_reolink_rest",
Expand Down
Loading

0 comments on commit 450badb

Please sign in to comment.