Skip to content

build(deps): bump actions/checkout from 4 to 6 #82

build(deps): bump actions/checkout from 4 to 6

build(deps): bump actions/checkout from 4 to 6 #82

Workflow file for this run

name: ESPHome Full Build CI
on: [push, pull_request]
jobs:
# Step 1 : List all .yaml files
list-files:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v6
- name: 📄 Build matrix
id: set-matrix
run: |
# Liste les .yaml à la racine, exclut secrets.yaml
FILES=$(ls *.yaml | grep -v "secrets.yaml" | jq -R -s -c 'split("\n")[:-1]')
echo "matrix=$FILES" >> "$GITHUB_OUTPUT"
# Step 2 : Check Coverage
coverage:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v6
- name: 🧪 Run Coverage Check
env:
TERM: xterm
run: |
./tools/check_coverage.sh
# Step 3 : Compile files
build:
needs: list-files
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
file: ${{ fromJson(needs.list-files.outputs.matrix) }}
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v6
- name: 🔄 Update ref to current branch
run: |
BRANCH_NAME=${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}
echo "Replace 'ref: main' by 'ref: $BRANCH_NAME' in ${{ matrix.file }}"
sed -i "s@ref: main@ref: ${BRANCH_NAME}@g" "${{ matrix.file }}"
- name: 🤫 Create dummy secrets.yaml
run: |
cat > secrets.yaml << 'EOF'
wifi_ssid: "ssid"
wifi_password: "password"
api_encryption_key: "/TQQDQvCLeJ1RfoihmoIUjSk+PtvOF9oUCoOGI53ie8="
proxy_api_encryption_key: "/TQQDQvCLeJ1RfoihmoIUjSk+PtvOF9oUCoOGI53ie8="
solar_water_heater_api_encryption_key: "/TQQDQvCLeJ1RfoihmoIUjSk+PtvOF9oUCoOGI53ie8="
wt32_eth01_api_encryption_key: "/TQQDQvCLeJ1RfoihmoIUjSk+PtvOF9oUCoOGI53ie8="
solar_router_ota_password: "/TQQDQvCLeJ1RfoihmoIUjSk+PtvOF9oUCoOGI53ie8="
solar_water_heater_ota_password: "/TQQDQvCLeJ1RfoihmoIUjSk+PtvOF9oUCoOGI53ie8="
wt32_eth01_ota_password: "/TQQDQvCLeJ1RfoihmoIUjSk+PtvOF9oUCoOGI53ie8="
EOF
- name: 🔍 Get ESPHome version
id: esphome-version
run: |
pip install esphome
VERSION=$(esphome version | awk '{print $2}')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "ESPHome version: $VERSION"
- name: 💾 Cache PlatformIO & ESPHome (shared)
uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio
.esphome
key: ${{ runner.os }}-esphome-${{ steps.esphome-version.outputs.version }}
restore-keys: |
${{ runner.os }}-esphome-${{ steps.esphome-version.outputs.version }}
${{ runner.os }}-esphome-
- name: 🚀 Build ESPHome Binary
uses: esphome/build-action@v6
with:
yaml-file: ${{ matrix.file }}
version: latest
# Décommente si tu veux récupérer les firmwares
# - name: 📦 Upload firmware
# uses: actions/upload-artifact@v4
# with:
# name: ${{ matrix.file }}-firmware
# path: .esphome/build/${{ matrix.file }}/**/firmware.bin
# if-no-files-found: error