-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 1.8 KB
/
firmware_build.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
on:
pull_request:
name: Build firmware
jobs:
changes:
name: Detect changes to keyboards
runs-on: ubuntu-20.04
permissions:
pull-requests: read
outputs:
keyboards: ${{steps.filter.outputs.changes}}
steps:
- uses: actions/checkout@v3
- name: Detect which keyboard had changes
uses: dorny/paths-filter@v2
id: filter
with:
filters: |
keyboards/planck/rev7/keymaps/soryn:
- 'keyboards/planck/rev7/keymaps/soryn/**'
build_firmware:
name: ${{matrix.keyboard}}
needs: changes
if: ${{needs.changes.outputs.keyboards != '[]' && needs.changes.outputs.keyboards != ''}}
strategy:
matrix:
keyboard: ${{ fromJSON(needs.changes.outputs.keyboards) }}
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Split changes keyboard string
uses: xom9ikk/split@v1
id: split
with:
string: ${{matrix.keyboard}}
separator: /
limit: -1
- name: Build firmware
uses: Soryyyn/qmk-build@v1.2
with:
keymap-path: "keyboards/planck/rev7/keymaps/soryn"
keyboard: "${{ steps.split.outputs._1 }}/${{ steps.split.outputs._2}}"
keymap: "${{ steps.split.outputs._4}}"
- name: Move firmware to folder
run: |
cp ./build/*.hex ./build/*.bin ./firmware
- name: Upload firmware to repo
uses: EndBug/add-and-commit@v9
with:
add: "./firmware"
message: "chore(firmware): Upload newest firmware for ${{matrix.keyboard}}"
pathspec_error_handling: exitAtEnd
default_author: github_actions