-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (45 loc) · 1.37 KB
/
Copy pathpull.yml
File metadata and controls
50 lines (45 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Pull Request — Validation
permissions:
contents: read
# yamllint disable-line rule:truthy
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Detect file changes
runs-on: ubuntu-latest
outputs:
config: ${{ steps.filter.outputs.config }}
esphome: ${{ steps.filter.outputs.esphome }}
steps:
- uses: actions/checkout@v7
- id: filter
uses: dorny/paths-filter@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
filters: |
config:
- '**/*.yaml'
- '**/*.yml'
- '.github/scripts/**'
- 'custom_components/**'
- 'esphome/**'
- '!**/*.md'
esphome:
- 'esphome/**'
- '!esphome/**/*.md'
validate:
name: Run validation suite
needs: changes
uses: ./.github/workflows/_ha-validate.yml
permissions:
contents: read
with:
# Only run ESPHome on esphome/** changes
run_esphome: ${{ needs.changes.outputs.esphome == 'true' }}
# Only run HA Stable when config files changed; otherwise mark "Skipped" but succeed
run_ha_stable: ${{ needs.changes.outputs.config == 'true' }}