Replace MIT license with BSD 2-Clause #56
This file contains hidden or 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: Validate HACS | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| hacs: | |
| name: HACS Integration Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Prepare HACS manifest for validation | |
| run: | | |
| python - <<'PY' | |
| import json | |
| from pathlib import Path | |
| path = Path("hacs.json") | |
| data = json.loads(path.read_text()) | |
| allowed = { | |
| "name", | |
| "content_in_root", | |
| "render_readme", | |
| "country", | |
| "homeassistant", | |
| "zip_release", | |
| "filename", | |
| "persistent_directory", | |
| "source", | |
| } | |
| sanitized = {k: v for k, v in data.items() if k in allowed} | |
| sanitized.setdefault("country", "ALL") | |
| path.write_text(json.dumps(sanitized, indent=2) + "\n") | |
| PY | |
| - name: Run HACS validation | |
| uses: hacs/action@main | |
| with: | |
| category: integration | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |