Always enable category when items are downloaded #3308
Workflow file for this run
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: Validate | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 0 * * *" | |
concurrency: | |
group: validate-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
validate-hassfest: | |
runs-on: ubuntu-latest | |
name: With hassfest | |
steps: | |
- name: 📥 Checkout the repository | |
uses: actions/checkout@v3.5.3 | |
- name: 🏃 Hassfest validation | |
uses: "home-assistant/actions/hassfest@master" | |
- name: 📨 Discord notification | |
if: ${{ github.event_name == 'schedule' && failure() }} | |
run: | | |
curl \ | |
-H "Content-Type: application/json" \ | |
-d '{"username": "GitHub action failure", "content": "[Scheduled action failed!](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})"}' \ | |
${{ secrets.DISCORD_WEBHOOK_ACTION_FAILURE }} | |
validate-hacs: | |
runs-on: ubuntu-latest | |
name: With HACS Action | |
steps: | |
- name: 🏃 HACS validation | |
uses: hacs/action@main | |
with: | |
category: integration | |
- name: 📨 Discord notification | |
if: ${{ github.event_name == 'schedule' && failure() }} | |
run: | | |
curl \ | |
-H "Content-Type: application/json" \ | |
-d '{"username": "GitHub action failure", "content": "[Scheduled action failed!](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})"}' \ | |
${{ secrets.DISCORD_WEBHOOK_ACTION_FAILURE }} | |
validata-hacs-data: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' }} | |
name: Validate HACS data generation | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3.5.3 | |
- name: Set up Python | |
uses: actions/setup-python@v4.7.0 | |
id: python | |
with: | |
python-version: "3.x" | |
cache: 'pip' | |
cache-dependency-path: | | |
requirements_base.txt | |
requirements_generate_data.txt | |
- name: Install dependencies | |
run: | | |
scripts/install/frontend | |
scripts/install/pip_packages --requirement requirements_generate_data.txt | |
- name: Generate data | |
run: python3 -m scripts.data.generate_category_data integration hacs/integration | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Validate output with JQ | |
run: | | |
jq -c . outputdata/integration/data.json | |
jq -c . outputdata/integration/repositories.json | |
validate-homeassistant: | |
name: With Home Assistant | |
strategy: | |
matrix: | |
channel: [stable, beta, dev, "2023.6.0"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout the repository | |
uses: actions/checkout@v3.5.3 | |
- name: 📋 Copy sample configuration for Home Assistant | |
run: | | |
mkdir ./test_configuration | |
bash scripts/install/frontend | |
cp -r ./custom_components ./test_configuration | |
echo "default_config:" >> ./test_configuration/configuration.yaml | |
echo "hacs:" >> ./test_configuration/configuration.yaml | |
echo " token: CHANGE_ME" >> ./test_configuration/configuration.yaml | |
- name: 🛠️ Setup Home Assistant | |
id: homeassistant | |
uses: ludeeus/setup-homeassistant@main | |
with: | |
tag: ${{ matrix.channel }} | |
config-dir: test_configuration | |
- name: 📨 Discord notification | |
if: ${{ github.event_name == 'schedule' && failure() }} | |
run: | | |
curl \ | |
-H "Content-Type: application/json" \ | |
-d '{"username": "GitHub action failure", "content": "[Scheduled action failed!](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})"}' \ | |
${{ secrets.DISCORD_WEBHOOK_ACTION_FAILURE }} |