Skip to content

Commit 0bdb2db

Browse files
Another Try
1 parent ac41daa commit 0bdb2db

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ jobs:
1212
name: Label Check
1313
runs-on: ubuntu-latest
1414
outputs:
15-
label: ${{ steps.find_label.outputs.label }}
15+
chosen_label: ${{ steps.find_label.outputs.chosen_label }}
16+
1617
steps:
17-
- name: Determine Single Label
18+
- name: Parse PR Body to Determine One Label
1819
id: find_label
1920
run: |
2021
body="${{ github.event.pull_request.body }}"
2122
22-
# We'll check each pattern in order. The first match wins, ignoring the rest.
23+
# We'll check in order: bugfix → new-feature → breaking-change → dependency-update
2324
label=""
25+
2426
if echo "$body" | grep -qE '- \\[x\\] Bugfix \\(fixed change that fixes an issue\\)'; then
2527
label="bugfix"
2628
elif echo "$body" | grep -qE '- \\[x\\] New feature \\(thanks!\\)'; then
@@ -31,21 +33,23 @@ jobs:
3133
label="dependency-update"
3234
fi
3335
34-
echo "Selected label: $label"
35-
echo "label=$label" >> $GITHUB_OUTPUT
36+
echo "Chosen label: $label"
37+
echo "chosen_label=$label" >> $GITHUB_OUTPUT
3638
37-
- name: Add Single Label if Found
38-
if: ${{ steps.find_label.outputs.label != '' }}
39+
- name: Apply Single Label
40+
if: ${{ steps.find_label.outputs.chosen_label != '' }}
3941
uses: actions-ecosystem/action-add-labels@v1
4042
with:
4143
github_token: ${{ secrets.GITHUB_TOKEN }}
42-
labels: ${{ steps.find_label.outputs.label }}
44+
labels: ${{ steps.find_label.outputs.chosen_label }}
45+
4346

4447
ci:
45-
name: ESPHome Build
48+
name: Building ${{ matrix.file }}
49+
needs: [ label-check ]
4650
runs-on: ubuntu-latest
47-
needs: label-check
4851
strategy:
52+
fail-fast: false
4953
matrix:
5054
file:
5155
- Integrations/ESPHome/PLT-1.yaml

0 commit comments

Comments
 (0)