All checks were successful
Savin's Home Assistant / build (push) Successful in 2m10s
75 lines
2.8 KiB
YAML
75 lines
2.8 KiB
YAML
---
|
|
name: "Savin's Home Assistant"
|
|
on: [push]
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
# - name: Install Custom Components (Hass.IO)
|
|
# run: |
|
|
# sudo mkdir -p ./custom_components
|
|
# pwd
|
|
# cd /tmp
|
|
# git clone https://github.com/custom-components/sensor.unifigateway.git unifigateway
|
|
# sudo cp -r ./unifigateway/custom_components/unifigateway /home/runner/work/home-assistant-conf/home-assistant-conf/custom_components/unifigateway
|
|
# git clone https://github.com/rgruebel/ha_zigbee2mqtt_networkmap.git zigbee2mqtt_networkmap
|
|
# sudo cp -r ./zigbee2mqtt_networkmap/custom_components/zigbee2mqtt_networkmap /home/runner/work/home-assistant-conf/home-assistant-conf/custom_components/zigbee2mqtt_networkmap
|
|
# git clone https://github.com/custom-components/hacs.git hacs_temp
|
|
# cd hacs_temp
|
|
# git checkout $(git describe --tags --always $(git rev-list --tags --max-count=1000) | grep -e "[0-9]\+\.[0-9]\+\.[0-9]\+$" | head -n 1)
|
|
# cd ../
|
|
# sudo cp -r hacs_temp/custom_components/hacs hacs
|
|
# rm -R hacs_temp
|
|
# sudo cp -r ./hacs /home/runner/work/home-assistant-conf/home-assistant-conf/custom_components
|
|
|
|
- name: Install system libs and dependencies
|
|
run: |
|
|
sudo apt-get -qq update
|
|
sudo apt-get -y -qq install libudev-dev ffmpeg
|
|
sudo apt-get -y -qq install libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev
|
|
sudo apt-get install nodejs
|
|
|
|
- name: Install Prettier
|
|
run: |
|
|
sudo npm install --global prettier
|
|
|
|
- name: Set up Python 3.8
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- name: Install Python packages (Lint)
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install black flake8 pylint yamllint
|
|
|
|
- name: YAML Lint
|
|
run: |
|
|
yamllint ./
|
|
|
|
# - name: Prettier Check Up
|
|
# run: |
|
|
# prettier --check --no-bracket-spacing '**/*.{yaml,json}'
|
|
|
|
- name: Install Python packages (Hass.IO)
|
|
run: |
|
|
pip install yq jq
|
|
pip install homeassistant
|
|
|
|
- name: Check HassIO configuration
|
|
run: |
|
|
sudo mkdir -p /config/snapshots
|
|
hass --version
|
|
mv secrets.yaml.sample secrets.yaml
|
|
hass -c . --script check_config | tee check.output
|
|
! less check.output | grep -q "Failed config"
|
|
|
|
- name: Send a telegram message with job status
|
|
if: always()
|
|
uses: appleboy/telegram-action@master
|
|
with:
|
|
to: ${{ secrets.TELEGRAM_TO }}
|
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
|
args: The last job from repo ({{repo}}) finished with ${{job.status}}.
|