generated from esphome/esphome-project-template
-
Notifications
You must be signed in to change notification settings - Fork 6
36 lines (34 loc) · 1006 Bytes
/
workflow-ci.yml
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
name: CI
on:
pull_request:
push:
branches-ignore:
- 'main'
- 'dependabot/**'
- 'gh-pages'
workflow_dispatch:
jobs:
ci:
name: Building ${{ matrix.file }}
runs-on: ubuntu-latest
strategy:
matrix:
file:
- bed-presence-mk1.factory.yaml
steps:
- name: Checkout source code
uses: actions/[email protected]
- name: Change remote_package branch to current dev branch
run: |
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
echo "Replacing @main with @${branch} in bed-presence-mk1.yaml"
sed -i "s/ref: main/ref: ${branch}/g" ./bed-presence-mk1.yaml
- name: Build ESPHome firmware to verify configuration
uses: esphome/[email protected]
id: esphome-build
with:
yaml-file: ${{ matrix.file }}
- uses: actions/[email protected]
with:
name: ${{ matrix.file }}
path: ${{ steps.esphome-build.outputs.name }}