Adds new integration [ludeeus/integration_blueprint] #6138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Check" | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- unlabeled | |
branches: | |
- master | |
paths: | |
- appdaemon | |
- integration | |
- plugin | |
- python_script | |
- template | |
- theme | |
concurrency: | |
group: checks-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: {} | |
jobs: | |
preflight: | |
runs-on: ubuntu-latest | |
name: Preflight | |
outputs: | |
repository: ${{ steps.repository.outputs.repository }} | |
category: ${{ steps.category.outputs.category }} | |
steps: | |
- name: Check out repository | |
uses: actions/[email protected] | |
- name: Clone origin | |
run: git clone --depth 1 https://github.com/hacs/default /tmp/repositories/default | |
- name: Set repository | |
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 | |
owner: | |
runs-on: ubuntu-latest | |
name: Owner | |
needs: preflight | |
steps: | |
- name: Check out repository | |
uses: actions/[email protected] | |
- name: Install dependencies if needed | |
run: scripts/setup | |
- name: Run the check | |
run: python3 -m scripts.check.owner | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPOSITORY: ${{needs.preflight.outputs.repository}} | |
editable: | |
runs-on: ubuntu-latest | |
name: Editable PR | |
steps: | |
- name: Check out repository | |
uses: actions/[email protected] | |
- name: Install dependencies if needed | |
run: scripts/setup | |
- name: Run the check | |
run: python3 -m scripts.check.edits | |
hassfest: | |
runs-on: ubuntu-latest | |
name: Hassfest | |
needs: preflight | |
if: needs.preflight.outputs.category == 'integration' | |
steps: | |
- name: Check out repository | |
uses: actions/[email protected] | |
- name: Clone new addition | |
run: | | |
git clone --depth 1 "https://github.com/${{needs.preflight.outputs.repository}}" /tmp/repositories/addition | |
- name: Get hassfest action | |
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 | |
- name: Run hassfest | |
run: | | |
integration=$(python3 -m scripts.helpers.integration_path) | |
domain=$(python3 -m scripts.helpers.domain) | |
docker run \ | |
--rm \ | |
-v "$integration":"/github/workspace/$domain" \ | |
hassfest | |
hacs: | |
runs-on: ubuntu-latest | |
name: HACS action | |
needs: preflight | |
steps: | |
- name: HACS action | |
uses: "hacs/action@main" | |
with: | |
repository: ${{needs.preflight.outputs.repository}} | |
category: ${{needs.preflight.outputs.category}} |