Update Labels #39
Workflow file for this run
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: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| label-check: | |
| name: Label Check | |
| runs-on: ubuntu-latest | |
| outputs: | |
| chosen_label: ${{ steps.find_label.outputs.chosen_label }} | |
| steps: | |
| - name: Parse PR Body to Determine One Label | |
| id: find_label | |
| run: | | |
| body="${{ github.event.pull_request.body }}" | |
| # We'll check in order: bugfix → new-feature → breaking-change → dependency-update | |
| label="" | |
| if echo "$body" | grep -qE '- \\[x\\] Bugfix \\(fixed change that fixes an issue\\)'; then | |
| label="bugfix" | |
| elif echo "$body" | grep -qE '- \\[x\\] New feature \\(thanks!\\)'; then | |
| label="new-feature" | |
| elif echo "$body" | grep -qE '- \\[x\\] Breaking change \\(repair/feature that breaks existing functionality\\)'; then | |
| label="breaking-change" | |
| elif echo "$body" | grep -qE '- \\[x\\] Dependency Update - Does not publish'; then | |
| label="dependency-update" | |
| fi | |
| echo "Chosen label: $label" | |
| echo "chosen_label=$label" >> $GITHUB_OUTPUT | |
| - name: Apply Single Label | |
| if: ${{ steps.find_label.outputs.chosen_label != '' }} | |
| uses: actions-ecosystem/action-add-labels@v1 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| labels: ${{ steps.find_label.outputs.chosen_label }} | |
| ci: | |
| name: Building ${{ matrix.file }} | |
| needs: [ label-check ] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| file: | |
| - Integrations/ESPHome/PLT-1.yaml | |
| - Integrations/ESPHome/PLT-1B.yaml | |
| esphome-version: | |
| - stable | |
| - beta | |
| - dev | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build ESPHome firmware | |
| uses: esphome/build-action@v6 | |
| with: | |
| yaml-file: ${{ matrix.file }} |