Merge branch 'dev' into jesserockz-2023-284

This commit is contained in:
Jesse Hills
2024-09-11 07:59:26 +12:00
committed by GitHub
844 changed files with 27640 additions and 19244 deletions

View File

@@ -23,7 +23,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4.1.7
- name: Set up Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: "3.11"

View File

@@ -42,13 +42,13 @@ jobs:
steps:
- uses: actions/checkout@v4.1.7
- name: Set up Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: "3.9"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.3.0
uses: docker/setup-buildx-action@v3.6.1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.0.0
uses: docker/setup-qemu-action@v3.2.0
- name: Set TAG
run: |

View File

@@ -9,6 +9,7 @@ on:
paths:
- "**"
- "!.github/workflows/*.yml"
- "!.github/actions/build-image/*"
- ".github/workflows/ci.yml"
- "!.yamllint"
- "!.github/dependabot.yml"
@@ -40,7 +41,7 @@ jobs:
run: echo key="${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }}" >> $GITHUB_OUTPUT
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
@@ -59,260 +60,194 @@ jobs:
pip install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt
pip install -e .
# black:
# name: Check black
# runs-on: ubuntu-latest
# needs:
# - common
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Restore Python
# uses: ./.github/actions/restore-python
# with:
# python-version: ${{ env.DEFAULT_PYTHON }}
# cache-key: ${{ needs.common.outputs.cache-key }}
# - name: Run black
# run: |
# . venv/bin/activate
# black --verbose esphome tests
# - name: Suggested changes
# run: script/ci-suggest-changes
# if: always()
black:
name: Check black
runs-on: ubuntu-latest
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.7
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Run black
run: |
. venv/bin/activate
black --verbose esphome tests
- name: Suggested changes
run: script/ci-suggest-changes
if: always()
# flake8:
# name: Check flake8
# runs-on: ubuntu-latest
# needs:
# - common
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Restore Python
# uses: ./.github/actions/restore-python
# with:
# python-version: ${{ env.DEFAULT_PYTHON }}
# cache-key: ${{ needs.common.outputs.cache-key }}
# - name: Run flake8
# run: |
# . venv/bin/activate
# flake8 esphome
# - name: Suggested changes
# run: script/ci-suggest-changes
# if: always()
flake8:
name: Check flake8
runs-on: ubuntu-latest
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.7
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Run flake8
run: |
. venv/bin/activate
flake8 esphome
- name: Suggested changes
run: script/ci-suggest-changes
if: always()
# pylint:
# name: Check pylint
# runs-on: ubuntu-latest
# needs:
# - common
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Restore Python
# uses: ./.github/actions/restore-python
# with:
# python-version: ${{ env.DEFAULT_PYTHON }}
# cache-key: ${{ needs.common.outputs.cache-key }}
# - name: Run pylint
# run: |
# . venv/bin/activate
# pylint -f parseable --persistent=n esphome
# - name: Suggested changes
# run: script/ci-suggest-changes
# if: always()
pylint:
name: Check pylint
runs-on: ubuntu-latest
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.7
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Run pylint
run: |
. venv/bin/activate
pylint -f parseable --persistent=n esphome
- name: Suggested changes
run: script/ci-suggest-changes
if: always()
# pyupgrade:
# name: Check pyupgrade
# runs-on: ubuntu-latest
# needs:
# - common
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Restore Python
# uses: ./.github/actions/restore-python
# with:
# python-version: ${{ env.DEFAULT_PYTHON }}
# cache-key: ${{ needs.common.outputs.cache-key }}
# - name: Run pyupgrade
# run: |
# . venv/bin/activate
# pyupgrade ${{ env.PYUPGRADE_TARGET }} `find esphome -name "*.py" -type f`
# - name: Suggested changes
# run: script/ci-suggest-changes
# if: always()
pyupgrade:
name: Check pyupgrade
runs-on: ubuntu-latest
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.7
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Run pyupgrade
run: |
. venv/bin/activate
pyupgrade ${{ env.PYUPGRADE_TARGET }} `find esphome -name "*.py" -type f`
- name: Suggested changes
run: script/ci-suggest-changes
if: always()
# ci-custom:
# name: Run script/ci-custom
# runs-on: ubuntu-latest
# needs:
# - common
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Restore Python
# uses: ./.github/actions/restore-python
# with:
# python-version: ${{ env.DEFAULT_PYTHON }}
# cache-key: ${{ needs.common.outputs.cache-key }}
# - name: Register matcher
# run: echo "::add-matcher::.github/workflows/matchers/ci-custom.json"
# - name: Run script/ci-custom
# run: |
# . venv/bin/activate
# script/ci-custom.py
# script/build_codeowners.py --check
ci-custom:
name: Run script/ci-custom
runs-on: ubuntu-latest
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.7
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Register matcher
run: echo "::add-matcher::.github/workflows/matchers/ci-custom.json"
- name: Run script/ci-custom
run: |
. venv/bin/activate
script/ci-custom.py
script/build_codeowners.py --check
# pytest:
# name: Run pytest
# strategy:
# fail-fast: false
# matrix:
# python-version:
# - "3.9"
# - "3.10"
# - "3.11"
# - "3.12"
# os:
# - ubuntu-latest
# - macOS-latest
# - windows-latest
# exclude:
# # Minimize CI resource usage
# # by only running the Python version
# # version used for docker images on Windows and macOS
# - python-version: "3.12"
# os: windows-latest
# - python-version: "3.10"
# os: windows-latest
# - python-version: "3.9"
# os: windows-latest
# - python-version: "3.12"
# os: macOS-latest
# - python-version: "3.10"
# os: macOS-latest
# - python-version: "3.9"
# os: macOS-latest
# runs-on: ${{ matrix.os }}
# needs:
# - common
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Restore Python
# uses: ./.github/actions/restore-python
# with:
# python-version: ${{ matrix.python-version }}
# cache-key: ${{ needs.common.outputs.cache-key }}
# - name: Register matcher
# run: echo "::add-matcher::.github/workflows/matchers/pytest.json"
# - name: Run pytest
# if: matrix.os == 'windows-latest'
# run: |
# ./venv/Scripts/activate
# pytest -vv --cov-report=xml --tb=native tests
# - name: Run pytest
# if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'
# run: |
# . venv/bin/activate
# pytest -vv --cov-report=xml --tb=native tests
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
pytest:
name: Run pytest
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
os:
- ubuntu-latest
- macOS-latest
- windows-latest
exclude:
# Minimize CI resource usage
# by only running the Python version
# version used for docker images on Windows and macOS
- python-version: "3.12"
os: windows-latest
- python-version: "3.10"
os: windows-latest
- python-version: "3.9"
os: windows-latest
- python-version: "3.12"
os: macOS-latest
- python-version: "3.10"
os: macOS-latest
- python-version: "3.9"
os: macOS-latest
runs-on: ${{ matrix.os }}
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.7
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ matrix.python-version }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Register matcher
run: echo "::add-matcher::.github/workflows/matchers/pytest.json"
- name: Run pytest
if: matrix.os == 'windows-latest'
run: |
./venv/Scripts/activate
pytest -vv --cov-report=xml --tb=native tests
- name: Run pytest
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'
run: |
. venv/bin/activate
pytest -vv --cov-report=xml --tb=native tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# clang-format:
# name: Check clang-format
# runs-on: ubuntu-latest
# needs:
# - common
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Restore Python
# uses: ./.github/actions/restore-python
# with:
# python-version: ${{ env.DEFAULT_PYTHON }}
# cache-key: ${{ needs.common.outputs.cache-key }}
# - name: Install clang-format
# run: |
# . venv/bin/activate
# pip install clang-format -c requirements_dev.txt
# - name: Run clang-format
# run: |
# . venv/bin/activate
# script/clang-format -i
# git diff-index --quiet HEAD --
# - name: Suggested changes
# run: script/ci-suggest-changes
# if: always()
# compile-tests-list:
# runs-on: ubuntu-latest
# outputs:
# matrix: ${{ steps.set-matrix.outputs.matrix }}
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Find all YAML test files
# id: set-matrix
# run: echo "matrix=$(ls tests/test*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
# validate-tests:
# name: Validate YAML test ${{ matrix.file }}
# runs-on: ubuntu-latest
# needs:
# - common
# - compile-tests-list
# strategy:
# fail-fast: false
# matrix:
# file: ${{ fromJson(needs.compile-tests-list.outputs.matrix) }}
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Restore Python
# uses: ./.github/actions/restore-python
# with:
# python-version: ${{ env.DEFAULT_PYTHON }}
# cache-key: ${{ needs.common.outputs.cache-key }}
# - name: Run esphome config ${{ matrix.file }}
# run: |
# . venv/bin/activate
# esphome config ${{ matrix.file }}
# compile-tests:
# name: Run YAML test ${{ matrix.file }}
# runs-on: ubuntu-latest
# needs:
# - common
# - black
# - ci-custom
# - clang-format
# - flake8
# - pylint
# - pytest
# - pyupgrade
# - compile-tests-list
# - validate-tests
# strategy:
# fail-fast: false
# max-parallel: 2
# matrix:
# file: ${{ fromJson(needs.compile-tests-list.outputs.matrix) }}
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Restore Python
# uses: ./.github/actions/restore-python
# with:
# python-version: ${{ env.DEFAULT_PYTHON }}
# cache-key: ${{ needs.common.outputs.cache-key }}
# - name: Run esphome compile ${{ matrix.file }}
# run: |
# . venv/bin/activate
# esphome compile ${{ matrix.file }}
clang-format:
name: Check clang-format
runs-on: ubuntu-latest
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.7
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Install clang-format
run: |
. venv/bin/activate
pip install clang-format -c requirements_dev.txt
- name: Run clang-format
run: |
. venv/bin/activate
script/clang-format -i
git diff-index --quiet HEAD --
- name: Suggested changes
run: script/ci-suggest-changes
if: always()
clang-tidy:
name: ${{ matrix.name }}
@@ -407,164 +342,165 @@ jobs:
# yamllint disable-line rule:line-length
if: always()
# list-components:
# runs-on: ubuntu-latest
# needs:
# - common
# if: github.event_name == 'pull_request'
# outputs:
# components: ${{ steps.list-components.outputs.components }}
# count: ${{ steps.list-components.outputs.count }}
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# with:
# # Fetch enough history so `git merge-base refs/remotes/origin/dev HEAD` works.
# fetch-depth: 500
# - name: Get target branch
# id: target-branch
# run: |
# echo "branch=${{ github.event.pull_request.base.ref }}" >> $GITHUB_OUTPUT
# - name: Fetch ${{ steps.target-branch.outputs.branch }} branch
# run: |
# git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/${{ steps.target-branch.outputs.branch }}:refs/remotes/origin/${{ steps.target-branch.outputs.branch }}
# git merge-base refs/remotes/origin/${{ steps.target-branch.outputs.branch }} HEAD
# - name: Restore Python
# uses: ./.github/actions/restore-python
# with:
# python-version: ${{ env.DEFAULT_PYTHON }}
# cache-key: ${{ needs.common.outputs.cache-key }}
# - name: Find changed components
# id: list-components
# run: |
# . venv/bin/activate
# components=$(script/list-components.py --changed --branch ${{ steps.target-branch.outputs.branch }})
# output_components=$(echo "$components" | jq -R -s -c 'split("\n")[:-1] | map(select(length > 0))')
# count=$(echo "$output_components" | jq length)
list-components:
runs-on: ubuntu-latest
needs:
- common
if: github.event_name == 'pull_request'
outputs:
components: ${{ steps.list-components.outputs.components }}
count: ${{ steps.list-components.outputs.count }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.7
with:
# Fetch enough history so `git merge-base refs/remotes/origin/dev HEAD` works.
fetch-depth: 500
- name: Get target branch
id: target-branch
run: |
echo "branch=${{ github.event.pull_request.base.ref }}" >> $GITHUB_OUTPUT
- name: Fetch ${{ steps.target-branch.outputs.branch }} branch
run: |
git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/${{ steps.target-branch.outputs.branch }}:refs/remotes/origin/${{ steps.target-branch.outputs.branch }}
git merge-base refs/remotes/origin/${{ steps.target-branch.outputs.branch }} HEAD
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Find changed components
id: list-components
run: |
. venv/bin/activate
components=$(script/list-components.py --changed --branch ${{ steps.target-branch.outputs.branch }})
output_components=$(echo "$components" | jq -R -s -c 'split("\n")[:-1] | map(select(length > 0))')
count=$(echo "$output_components" | jq length)
# echo "components=$output_components" >> $GITHUB_OUTPUT
# echo "count=$count" >> $GITHUB_OUTPUT
echo "components=$output_components" >> $GITHUB_OUTPUT
echo "count=$count" >> $GITHUB_OUTPUT
# echo "$count Components:"
# echo "$output_components" | jq
echo "$count Components:"
echo "$output_components" | jq
# test-build-components:
# name: Component test ${{ matrix.file }}
# runs-on: ubuntu-latest
# needs:
# - common
# - list-components
# if: github.event_name == 'pull_request' && fromJSON(needs.list-components.outputs.count) > 0 && fromJSON(needs.list-components.outputs.count) < 100
# strategy:
# fail-fast: false
# max-parallel: 2
# matrix:
# file: ${{ fromJson(needs.list-components.outputs.components) }}
# steps:
# - name: Install dependencies
# run: sudo apt-get install libsodium-dev libsdl2-dev
test-build-components:
name: Component test ${{ matrix.file }}
runs-on: ubuntu-latest
needs:
- common
- list-components
if: github.event_name == 'pull_request' && fromJSON(needs.list-components.outputs.count) > 0 && fromJSON(needs.list-components.outputs.count) < 100
strategy:
fail-fast: false
max-parallel: 2
matrix:
file: ${{ fromJson(needs.list-components.outputs.components) }}
steps:
- name: Install dependencies
run: sudo apt-get install libsdl2-dev
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Restore Python
# uses: ./.github/actions/restore-python
# with:
# python-version: ${{ env.DEFAULT_PYTHON }}
# cache-key: ${{ needs.common.outputs.cache-key }}
# - name: test_build_components -e config -c ${{ matrix.file }}
# run: |
# . venv/bin/activate
# ./script/test_build_components -e config -c ${{ matrix.file }}
# - name: test_build_components -e compile -c ${{ matrix.file }}
# run: |
# . venv/bin/activate
# ./script/test_build_components -e compile -c ${{ matrix.file }}
- name: Check out code from GitHub
uses: actions/checkout@v4.1.7
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: test_build_components -e config -c ${{ matrix.file }}
run: |
. venv/bin/activate
./script/test_build_components -e config -c ${{ matrix.file }}
- name: test_build_components -e compile -c ${{ matrix.file }}
run: |
. venv/bin/activate
./script/test_build_components -e compile -c ${{ matrix.file }}
# test-build-components-splitter:
# name: Split components for testing into 20 groups maximum
# runs-on: ubuntu-latest
# needs:
# - common
# - list-components
# if: github.event_name == 'pull_request' && fromJSON(needs.list-components.outputs.count) >= 100
# outputs:
# matrix: ${{ steps.split.outputs.components }}
# steps:
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Split components into 20 groups
# id: split
# run: |
# components=$(echo '${{ needs.list-components.outputs.components }}' | jq -c '.[]' | shuf | jq -s -c '[_nwise(20) | join(" ")]')
# echo "components=$components" >> $GITHUB_OUTPUT
test-build-components-splitter:
name: Split components for testing into 20 groups maximum
runs-on: ubuntu-latest
needs:
- common
- list-components
if: github.event_name == 'pull_request' && fromJSON(needs.list-components.outputs.count) >= 100
outputs:
matrix: ${{ steps.split.outputs.components }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.7
- name: Split components into 20 groups
id: split
run: |
components=$(echo '${{ needs.list-components.outputs.components }}' | jq -c '.[]' | shuf | jq -s -c '[_nwise(20) | join(" ")]')
echo "components=$components" >> $GITHUB_OUTPUT
# test-build-components-split:
# name: Test split components
# runs-on: ubuntu-latest
# needs:
# - common
# - list-components
# - test-build-components-splitter
# if: github.event_name == 'pull_request' && fromJSON(needs.list-components.outputs.count) >= 100
# strategy:
# fail-fast: false
# max-parallel: 4
# matrix:
# components: ${{ fromJson(needs.test-build-components-splitter.outputs.matrix) }}
# steps:
# - name: List components
# run: echo ${{ matrix.components }}
test-build-components-split:
name: Test split components
runs-on: ubuntu-latest
needs:
- common
- list-components
- test-build-components-splitter
if: github.event_name == 'pull_request' && fromJSON(needs.list-components.outputs.count) >= 100
strategy:
fail-fast: false
max-parallel: 4
matrix:
components: ${{ fromJson(needs.test-build-components-splitter.outputs.matrix) }}
steps:
- name: List components
run: echo ${{ matrix.components }}
# - name: Install dependencies
# run: sudo apt-get install libsodium-dev libsdl2-dev
- name: Install dependencies
run: sudo apt-get install libsdl2-dev
# - name: Check out code from GitHub
# uses: actions/checkout@v4.1.7
# - name: Restore Python
# uses: ./.github/actions/restore-python
# with:
# python-version: ${{ env.DEFAULT_PYTHON }}
# cache-key: ${{ needs.common.outputs.cache-key }}
# - name: Validate config
# run: |
# . venv/bin/activate
# for component in ${{ matrix.components }}; do
# ./script/test_build_components -e config -c $component
# done
# - name: Compile config
# run: |
# . venv/bin/activate
# for component in ${{ matrix.components }}; do
# ./script/test_build_components -e compile -c $component
# done
- name: Check out code from GitHub
uses: actions/checkout@v4.1.7
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Validate config
run: |
. venv/bin/activate
for component in ${{ matrix.components }}; do
./script/test_build_components -e config -c $component
done
- name: Compile config
run: |
. venv/bin/activate
mkdir build_cache
export PLATFORMIO_BUILD_CACHE_DIR=$PWD/build_cache
for component in ${{ matrix.components }}; do
./script/test_build_components -e compile -c $component
done
# ci-status:
# name: CI Status
# runs-on: ubuntu-latest
# needs:
# - common
# - black
# - ci-custom
# - clang-format
# - flake8
# - pylint
# - pytest
# - pyupgrade
# - compile-tests
# - clang-tidy
# - list-components
# - test-build-components
# - test-build-components-splitter
# - test-build-components-split
# if: always()
# steps:
# - name: Success
# if: ${{ !(contains(needs.*.result, 'failure')) }}
# run: exit 0
# - name: Failure
# if: ${{ contains(needs.*.result, 'failure') }}
# env:
# JSON_DOC: ${{ toJSON(needs) }}
# run: |
# echo $JSON_DOC | jq
# exit 1
ci-status:
name: CI Status
runs-on: ubuntu-latest
needs:
- common
- black
- ci-custom
- clang-format
- flake8
- pylint
- pytest
- pyupgrade
- clang-tidy
- list-components
- test-build-components
- test-build-components-splitter
- test-build-components-split
if: always()
steps:
- name: Success
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failure
if: ${{ contains(needs.*.result, 'failure') }}
env:
JSON_DOC: ${{ toJSON(needs) }}
run: |
echo $JSON_DOC | jq
exit 1

View File

@@ -53,7 +53,7 @@ jobs:
steps:
- uses: actions/checkout@v4.1.7
- name: Set up Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: "3.x"
- name: Set up python environment
@@ -65,7 +65,7 @@ jobs:
pip3 install build
python3 -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.9.0
uses: pypa/gh-action-pypi-publish@v1.10.1
deploy-docker:
name: Build ESPHome ${{ matrix.platform }}
@@ -85,23 +85,23 @@ jobs:
steps:
- uses: actions/checkout@v4.1.7
- name: Set up Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: "3.9"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.3.0
uses: docker/setup-buildx-action@v3.6.1
- name: Set up QEMU
if: matrix.platform != 'linux/amd64'
uses: docker/setup-qemu-action@v3.0.0
uses: docker/setup-qemu-action@v3.2.0
- name: Log in to docker hub
uses: docker/login-action@v3.2.0
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the GitHub container registry
uses: docker/login-action@v3.2.0
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -141,7 +141,7 @@ jobs:
echo name=$(cat /tmp/platform) >> $GITHUB_OUTPUT
- name: Upload digests
uses: actions/upload-artifact@v4.3.3
uses: actions/upload-artifact@v4.4.0
with:
name: digests-${{ steps.sanitize.outputs.name }}
path: /tmp/digests
@@ -177,24 +177,24 @@ jobs:
- uses: actions/checkout@v4.1.7
- name: Download digests
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4.1.8
with:
pattern: digests-*
path: /tmp/digests
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.3.0
uses: docker/setup-buildx-action@v3.6.1
- name: Log in to docker hub
if: matrix.registry == 'dockerhub'
uses: docker/login-action@v3.2.0
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the GitHub container registry
if: matrix.registry == 'ghcr'
uses: docker/login-action@v3.2.0
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}

View File

@@ -22,7 +22,7 @@ jobs:
path: lib/home-assistant
- name: Setup Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: 3.12
@@ -36,7 +36,7 @@ jobs:
python ./script/sync-device_class.py
- name: Commit changes
uses: peter-evans/create-pull-request@v6.1.0
uses: peter-evans/create-pull-request@v7.0.0
with:
commit-message: "Synchronise Device Classes from Home Assistant"
committer: esphomebot <esphome@nabucasa.com>