Skip to content

Created script to restart ESP devices. #2057

Created script to restart ESP devices.

Created script to restart ESP devices. #2057

Workflow file for this run

---
name: Home Assistant CI
# yamllint disable-line rule:truthy
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:
jobs:
yamllint:
name: "🧹 YAML Lint"
runs-on: ubuntu-latest
steps:
- name: ‡️ Getting your configuration from GitHub
uses: actions/checkout@v4
- name: Running YAMLlint
uses: ibiqlik/action-yamllint@v3
continue-on-error: true
with:
config_file: .github/yamllint-config.yml
# https://github.com/ibiqlik/action-yamllint/issues/14#issuecomment-796554388
format: parsable
remarklint:
name: "🧹 Remark Lint"
runs-on: ubuntu-latest
steps:
- name: ‡️ Getting your configuration from GitHub
uses: actions/checkout@v4
- name: Running Remark lint
uses: "docker://pipelinecomponents/remark-lint:latest"
continue-on-error: true
with:
args: "remark --no-stdout --color --frail --use preset-lint-recommended ."
ha-stable-check:
name: "🏑 Home Assistant Core Stable Configuration Check"
needs: [yamllint, remarklint]
runs-on: ubuntu-latest
steps:
- name: ‡️ Check out configuration from GitHub
uses: actions/checkout@v4
# Create test directory
- name: βž• Create test directory
run: |
mkdir -p camera
# Integrations does not exist in custom components during checkout:
- name: βž– Remove battery_notes integration
run: |
sed -i -e '/battery_notes\:/,+2d' configuration.yaml
- name: βž– Remove delete integration
run: |
sed -i -e '/delete\:/,+1d' configuration.yaml
- name: βž– Remove Powercalc integration
run: |
sed -i -e '/powercalc\:/,+2d' configuration.yaml
- name: βž– Remove Sonoff integration
run: |
sed -i -e '/sonoff\:/,+3d' configuration.yaml
- name: πŸš€ Run Home Assistant Configuration Check
uses: frenck/action-home-assistant@v1
with:
path: "./"
secrets: ./secrets.yaml.sample
version: "stable"
ha-future-checks:
name: "🏒 Home Assistant Core ${{ matrix.version }} Configuration Check"
needs: [yamllint, remarklint]
runs-on: ubuntu-latest
strategy:
matrix:
version: ["beta", "dev"]
steps:
- name: ‡️ Check out configuration from GitHub
uses: actions/checkout@v4
# Create test directory
- name: βž• Create test directory
run: |
mkdir -p camera
# Integrations does not exist in custom components during checkout:
- name: βž– Remove battery_notes integration
run: |
sed -i -e '/battery_notes\:/,+2d' configuration.yaml
- name: βž– Remove delete integration
run: |
sed -i -e '/delete\:/,+1d' configuration.yaml
- name: βž– Remove Powercalc integration
run: |
sed -i -e '/powercalc\:/,+2d' configuration.yaml
- name: βž– Remove Sonoff integration
run: |
sed -i -e '/sonoff\:/,+3d' configuration.yaml
- name: πŸš€ Run Home Assistant Configuration Check
uses: frenck/action-home-assistant@v1
continue-on-error: true
with:
path: "./"
secrets: ./secrets.yaml.sample
version: "${{ matrix.version }}"
deploy:
name: "πŸš€ Deploy changes"
needs: [ha-stable-check]
runs-on: ubuntu-latest
steps:
- name: πŸ”Œ Tailscale
uses: tailscale/github-action@v2
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
version: 1.58.2
- name: 🚚 Deploying
uses: Wandalen/[email protected]
with:
action: fjogeleit/http-request-action@master
with: |
url: '${{ secrets.DEPLOYMENT_URL }}'
method: POST
customHeaders: '{"Content-Type":"application/json"}'
data: '{ "key_token":"${{ secrets.PULL_KEY }}" }'
attempt_limit: 3
attempt_delay: 2000
esphome:
name: "πŸ› οΈ ESPHome check"
runs-on: ubuntu-latest
needs: [yamllint]
steps:
- name: ‡️ Check out configuration from GitHub
uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install esphome
pip list
esphome version
- name: ✍️ Copy stub files into configuration folder
run: cp -R ./esphome/secrets.yaml.sample ./esphome/secrets.yaml
- name: πŸš€ Run esphome on all files
continue-on-error: true
run: |
for file in $(find ./esphome -type f -name "*.yaml" -not -name "secrets.yaml"); do esphome "${file}" config; done