1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-05 10:20:27 +01:00

Merge remote-tracking branch 'origin/dev' into nrf52

This commit is contained in:
Tomasz Duda 2024-05-10 14:03:10 +02:00
commit 1355fe7c89
4 changed files with 28 additions and 4 deletions

View File

@ -34,6 +34,16 @@ runs:
echo $l >> $GITHUB_OUTPUT
done
# set cache-to only if dev branch
- id: cache-to
shell: bash
run: |-
if [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then
echo "value=type=gha,mode=max" >> $GITHUB_OUTPUT
else
echo "value=" >> $GITHUB_OUTPUT
fi
- name: Build and push to ghcr by digest
id: build-ghcr
uses: docker/build-push-action@v5.3.0
@ -43,7 +53,7 @@ runs:
platforms: ${{ inputs.platform }}
target: ${{ inputs.target }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: ${{ steps.cache-to.outputs.value }}
build-args: |
BASEIMGTYPE=${{ inputs.baseimg }}
BUILD_VERSION=${{ inputs.version }}
@ -66,7 +76,7 @@ runs:
platforms: ${{ inputs.platform }}
target: ${{ inputs.target }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: ${{ steps.cache-to.outputs.value }}
build-args: |
BASEIMGTYPE=${{ inputs.baseimg }}
BUILD_VERSION=${{ inputs.version }}

View File

@ -364,12 +364,20 @@ jobs:
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Cache platformio
if: github.ref == 'refs/heads/dev'
uses: actions/cache@v4.0.2
with:
path: ~/.platformio
# yamllint disable-line rule:line-length
key: platformio-${{ matrix.pio_cache_key }}-${{ hashFiles('platformio.ini') }}
key: platformio-${{ matrix.pio_cache_key }}
- name: Cache platformio
if: github.ref != 'refs/heads/dev'
uses: actions/cache/restore@v4.0.2
with:
path: ~/.platformio
key: platformio-${{ matrix.pio_cache_key }}
- name: Install clang-tidy
run: sudo apt-get install clang-tidy-14

View File

@ -148,6 +148,8 @@ class Config(OrderedDict, fv.FinalValidateConfig):
path = path or []
try:
yield
except cv.FinalExternalInvalid as e:
self.add_error(e)
except vol.Invalid as e:
e.prepend(path)
self.add_error(e)

View File

@ -268,6 +268,10 @@ class Required(vol.Required):
super().__init__(key, msg=msg)
class FinalExternalInvalid(Invalid):
"""Represents an invalid value in the final validation phase where the path should not be prepended."""
def check_not_templatable(value):
if isinstance(value, Lambda):
raise Invalid("This option is not templatable!")