Bump the artifacts group across 1 directory with 2 updates #222
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| pull_request: | |
| schedule: | |
| - cron: "0 5 * * 1" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| # yamllint disable-line rule:line-length | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| TEST_RELEASE_SUMMARY: |- | |
| Test "release" summary | |
| * Multiple lines | |
| jobs: | |
| build: | |
| name: esphome:${{ matrix.esphome-version }} / ${{ matrix.manifest }} / ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 2 | |
| matrix: | |
| esphome-version: | |
| - stable | |
| - beta | |
| - dev | |
| manifest: | |
| - complete | |
| - partial | |
| os: | |
| - ubuntu-24.04 | |
| - ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Run action | |
| uses: ./ | |
| id: esphome-build | |
| with: | |
| yaml-file: tests/test.yaml | |
| version: ${{ matrix.esphome-version }} | |
| release-summary: ${{ env.TEST_RELEASE_SUMMARY }} | |
| release-url: "https://github.com/esphome/build-action" | |
| complete-manifest: ${{ matrix.manifest == 'complete' }} | |
| - name: Write version to file | |
| run: echo ${{ steps.esphome-build.outputs.version }} > ${{ steps.esphome-build.outputs.name }}/version | |
| - name: Upload ESPHome binary | |
| uses: actions/[email protected] | |
| with: | |
| name: build-output-files-${{ matrix.esphome-version }}-${{ matrix.manifest }}-${{ matrix.os }} | |
| path: ${{ steps.esphome-build.outputs.name }} | |
| verify: | |
| name: Verify output files for esphome:${{ matrix.esphome-version }} with ${{ matrix.manifest }} manifest | |
| runs-on: ${{ matrix.os }} | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| esphome-version: | |
| - stable | |
| - beta | |
| - dev | |
| manifest: | |
| - complete | |
| - partial | |
| os: | |
| - ubuntu-24.04 | |
| - ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Download files | |
| uses: actions/[email protected] | |
| with: | |
| name: build-output-files-${{ matrix.esphome-version }}-${{ matrix.manifest }}-${{ matrix.os }} | |
| - name: List files | |
| run: |- | |
| ls -al | |
| tree | |
| - name: Validate json file matches ${{ matrix.manifest }} manifest-template.json | |
| run: | | |
| jq -n \ | |
| --arg ota_md5 "$(md5sum test-esp32.ota.bin | head -c 32)" \ | |
| --arg ota_sha256 "$(sha256sum test-esp32.ota.bin | head -c 64)" \ | |
| --arg factory_md5 "$(md5sum test-esp32.factory.bin | head -c 32)" \ | |
| --arg factory_sha256 "$(sha256sum test-esp32.factory.bin | head -c 64)" \ | |
| -f tests/${{ matrix.manifest }}-manifest-template.json > /tmp/manifest.json | |
| diff <(jq --sort-keys . /tmp/manifest.json) <(jq --sort-keys . manifest.json) |