summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-04-10 07:38:09 +1000
committerGitHub <noreply@github.com>2023-04-09 22:38:09 +0100
commitfb706f42a2f02655f4a231edf6661ed23e70321d (patch)
treec572369204423442b93c713ca9db0ae2cea476ae /.github/workflows
parent9132c643899a3f6bed984b55680c7496e054f3a9 (diff)
Run CI builds for each push, limit queued workflow depth to 1. (#20362)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci_builds.yml18
1 files changed, 12 insertions, 6 deletions
diff --git a/.github/workflows/ci_builds.yml b/.github/workflows/ci_builds.yml
index e101b31c7c..372dcb8dd7 100644
--- a/.github/workflows/ci_builds.yml
+++ b/.github/workflows/ci_builds.yml
@@ -4,9 +4,16 @@ permissions:
   contents: read
 
 on:
+  push:
+    branches: [master, develop]
   workflow_dispatch:
-  schedule:
-    - cron: '0 0,12 * * *'
+    inputs:
+      branch:
+        type: choice
+        description: 'Branch to build'
+        options: [master, develop]
+
+concurrency: ci_build-${{ github.event.inputs.branch || github.ref_name }}
 
 jobs:
   ci_builds:
@@ -18,7 +25,6 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        branch: [master, develop]
         keymap: [default, via]
 
     container: qmkfm/qmk_cli
@@ -30,7 +36,7 @@ jobs:
     - uses: actions/checkout@v3
       with:
         submodules: recursive
-        ref: ${{ matrix.branch }}
+        ref: ${{ github.event.inputs.branch || github.ref }}
 
     - name: Install dependencies
       run: pip3 install -r requirements.txt
@@ -50,7 +56,7 @@ jobs:
       uses: actions/upload-artifact@v3
       if: always()
       with:
-        name: artifacts-${{ matrix.branch }}-${{ matrix.keymap }}
+        name: artifacts-${{ github.event.inputs.branch || github.ref_name }}-${{ matrix.keymap }}
         if-no-files-found: ignore
         path: |
           *.bin
@@ -65,4 +71,4 @@ jobs:
         DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }}
       run: |
         python3 -m pip install -r requirements.txt
-        python3 ./discord-results.py --branch ${{ matrix.branch }} --keymap ${{ matrix.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+        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 }}