Skip to content

Commit fb706f4

Browse files
authored
Run CI builds for each push, limit queued workflow depth to 1. (qmk#20362)
1 parent 9132c64 commit fb706f4

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/ci_builds.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@ permissions:
44
contents: read
55

66
on:
7+
push:
8+
branches: [master, develop]
79
workflow_dispatch:
8-
schedule:
9-
- cron: '0 0,12 * * *'
10+
inputs:
11+
branch:
12+
type: choice
13+
description: 'Branch to build'
14+
options: [master, develop]
15+
16+
concurrency: ci_build-${{ github.event.inputs.branch || github.ref_name }}
1017

1118
jobs:
1219
ci_builds:
@@ -18,7 +25,6 @@ jobs:
1825
strategy:
1926
fail-fast: false
2027
matrix:
21-
branch: [master, develop]
2228
keymap: [default, via]
2329

2430
container: qmkfm/qmk_cli
@@ -30,7 +36,7 @@ jobs:
3036
- uses: actions/checkout@v3
3137
with:
3238
submodules: recursive
33-
ref: ${{ matrix.branch }}
39+
ref: ${{ github.event.inputs.branch || github.ref }}
3440

3541
- name: Install dependencies
3642
run: pip3 install -r requirements.txt
@@ -50,7 +56,7 @@ jobs:
5056
uses: actions/upload-artifact@v3
5157
if: always()
5258
with:
53-
name: artifacts-${{ matrix.branch }}-${{ matrix.keymap }}
59+
name: artifacts-${{ github.event.inputs.branch || github.ref_name }}-${{ matrix.keymap }}
5460
if-no-files-found: ignore
5561
path: |
5662
*.bin
@@ -65,4 +71,4 @@ jobs:
6571
DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }}
6672
run: |
6773
python3 -m pip install -r requirements.txt
68-
python3 ./discord-results.py --branch ${{ matrix.branch }} --keymap ${{ matrix.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
74+
python3 ./discord-results.py --branch ${{ github.event.inputs.branch || github.ref_name }} --keymap ${{ matrix.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

0 commit comments

Comments
 (0)