forked from neffs/esphome
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag '2024.6.4' into bsec2_bme68x
- Loading branch information
Showing
3,929 changed files
with
118,526 additions
and
11,072 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,16 +34,26 @@ 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.0.0 | ||
uses: docker/build-push-action@v6.0.1 | ||
with: | ||
context: . | ||
file: ./docker/Dockerfile | ||
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 }} | ||
|
@@ -57,24 +67,16 @@ runs: | |
digest="${{ steps.build-ghcr.outputs.digest }}" | ||
touch "/tmp/digests/${{ inputs.target }}/ghcr/${digest#sha256:}" | ||
- name: Upload ghcr digest | ||
uses: actions/[email protected] | ||
with: | ||
name: digests-${{ inputs.target }}-ghcr | ||
path: /tmp/digests/${{ inputs.target }}/ghcr/* | ||
if-no-files-found: error | ||
retention-days: 1 | ||
|
||
- name: Build and push to dockerhub by digest | ||
id: build-dockerhub | ||
uses: docker/build-push-action@v5.0.0 | ||
uses: docker/build-push-action@v6.0.1 | ||
with: | ||
context: . | ||
file: ./docker/Dockerfile | ||
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 }} | ||
|
@@ -87,11 +89,3 @@ runs: | |
mkdir -p /tmp/digests/${{ inputs.target }}/dockerhub | ||
digest="${{ steps.build-dockerhub.outputs.digest }}" | ||
touch "/tmp/digests/${{ inputs.target }}/dockerhub/${digest#sha256:}" | ||
- name: Upload dockerhub digest | ||
uses: actions/[email protected] | ||
with: | ||
name: digests-${{ inputs.target }}-dockerhub | ||
path: /tmp/digests/${{ inputs.target }}/dockerhub/* | ||
if-no-files-found: error | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: API Proto CI | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "esphome/components/api/api.proto" | ||
- "esphome/components/api/api_pb2.cpp" | ||
- "esphome/components/api/api_pb2.h" | ||
- "esphome/components/api/api_pb2_service.cpp" | ||
- "esphome/components/api/api_pb2_service.h" | ||
- "script/api_protobuf/api_protobuf.py" | ||
- ".github/workflows/ci-api-proto.yml" | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
check: | ||
name: Check generated files | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install apt dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt-cache show protobuf-compiler | ||
sudo apt install -y protobuf-compiler | ||
protoc --version | ||
- name: Install python dependencies | ||
run: pip install aioesphomeapi -c requirements.txt -r requirements_dev.txt | ||
- name: Generate files | ||
run: script/api_protobuf/api_protobuf.py | ||
- name: Check for changes | ||
run: | | ||
if ! git diff --quiet; then | ||
echo "## Job Failed" | tee -a $GITHUB_STEP_SUMMARY | ||
echo "You have altered the generated proto files but they do not match what is expected." | tee -a $GITHUB_STEP_SUMMARY | ||
echo "Please run 'script/api_protobuf/api_protobuf.py' and commit the changes." | tee -a $GITHUB_STEP_SUMMARY | ||
exit 1 | ||
fi | ||
- if: failure() | ||
name: Review PR | ||
uses: actions/[email protected] | ||
with: | ||
script: | | ||
await github.rest.pulls.createReview({ | ||
pull_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
event: 'REQUEST_CHANGES', | ||
body: 'You have altered the generated proto files but they do not match what is expected.\nPlease run "script/api_protobuf/api_protobuf.py" and commit the changes.' | ||
}) | ||
- if: success() | ||
name: Dismiss review | ||
uses: actions/[email protected] | ||
with: | ||
script: | | ||
let reviews = await github.rest.pulls.listReviews({ | ||
pull_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo | ||
}); | ||
for (let review of reviews.data) { | ||
if (review.user.login === 'github-actions[bot]' && review.state === 'CHANGES_REQUESTED') { | ||
await github.rest.pulls.dismissReview({ | ||
pull_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
review_id: review.id, | ||
message: 'Files now match the expected proto files.' | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
name: CI for docker images | ||
|
||
# Only run when docker paths change | ||
# yamllint disable-line rule:truthy | ||
|
||
on: | ||
push: | ||
branches: [dev, beta, release] | ||
|
@@ -40,13 +40,13 @@ jobs: | |
arch: [amd64, armv7, aarch64] | ||
build_type: ["ha-addon", "docker", "lint"] | ||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].6 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5.0.0 | ||
uses: actions/setup-python@v5.1.0 | ||
with: | ||
python-version: "3.9" | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3.0.0 | ||
uses: docker/setup-buildx-action@v3.3.0 | ||
- name: Set up QEMU | ||
uses: docker/[email protected] | ||
|
||
|
Oops, something went wrong.