Add matter over Thread #5
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
name: Build | |
on: | |
push: | |
branches: | |
- main | |
- feature/* | |
workflow_dispatch: | |
permissions: read-all | |
jobs: | |
trunk_check: | |
name: Trunk Check | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write # For trunk to post annotations | |
contents: read # For repo checkout | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Trunk Check | |
uses: trunk-io/trunk-action@v1 | |
build_docker_image: | |
name: Build docker image | |
runs-on: ubuntu-latest | |
needs: trunk_check | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
context: ./ci/docker/ | |
tags: ghcr.io/begoonlab/esp_idf_xiao_esp32c6_sensor:latest | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build_for_wifi: | |
name: Build firmware for WiFi setup | |
runs-on: ubuntu-latest | |
needs: build_docker_image | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build firmware | |
run: | | |
docker run --rm -t \ | |
-v $PWD:/opt/esp/project \ | |
-w /opt/esp/project \ | |
ghcr.io/begoonlab/esp_idf_xiao_esp32c6_sensor:latest idf.py -D SDKCONFIG_DEFAULTS="sdkconfig.ci.wifi" build |