Files
hassio-configuration/.github/workflows/build.yaml
Alex Savin eec6066c7b
All checks were successful
Savin's Home Assistant / build (push) Successful in 2m5s
More changes
2025-02-07 17:46:02 -05:00

107 lines
4.1 KiB
YAML

---
name: Savin's Home Assistant
on:
push:
branches: [develop]
paths-ignore:
- 'README.md'
# - '.github/**'
pull_request:
branches: [develop]
paths-ignore:
- 'README.md'
# - '.github/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Custom Components (Hass.IO)
run: |
pwd
ls -la
sudo mkdir -p ./custom_components
pwd
cd /tmp
git clone https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor.git
sudo cp -r ./Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/custom_components/xiaomi_cloud_map_extractor /workspace/alex/hassio-configuration/custom_components/xiaomi_cloud_map_extractor
# git checkout $(git describe --tags --always $(git rev-list --tags --max-count=1000) | grep -e "[0-9]\+\.[0-9]\+\.[0-9]\+$" | head -n 1)
- name: Install system libs and dependencies
run: |
sudo echo "deb [signed-by=/etc/apt/trusted.gpg.d/libjpeg-turbo.gpg] https://packagecloud.io/dcommander/libjpeg-turbo/any/ any main" > /etc/apt/sources.list.d/libjpeg-turbo.list
wget -q -O- https://packagecloud.io/dcommander/libjpeg-turbo/gpgkey | gpg --dearmor > /etc/apt/trusted.gpg.d/libjpeg-turbo.gpg
sudo apt-get -qq update
sudo apt-get -y -qq install libjpeg-turbo-official 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.13
uses: actions/setup-python@v5
with:
python-version: 3.13
- 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 colorlog
pip install homeassistant
echo "Installing crypto, requered by Component: xiaomi_cloud_map_extractor\n"
pip install pycryptodome requests python-miio pybase64 pillow
echo "Installing numpy, requered by Component: mobile_app, stream and camera\n"
pip install numpy
echo "Installing hassil, requered by Component: mobile_app\n"
pip install hassil
echo "Installing mutagen, requered by Component: mobile_app\n"
pip install mutagen
echo "Installing home_assistant_intents, requered by Component: mobile_app\n"
pip install home_assistant_intents
echo "Installing RestrictedPython, requered by Component: python_script\n"
pip install RestrictedPython
echo "Installing twilio, requered by Component: twilio\n"
pip install twilio
echo "Installing python-telegram-bot, requered by Component: telegram_bot\n"
pip install python-telegram-bot
echo "Installing pyeiscp, requered by Component: onkyo\n"
pip install pyeiscp
echo "Installing async_upnp_client, requered by Component: ssdp\n"
pip install async_upnp_client
- name: Check HassIO configuration
run: |
sudo mkdir -p /config/www
hass --version
mv secrets.sample.yaml secrets.yaml
ls -la
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}}.