SDL: Only cancel previous builds when iterating on pull requests

From 39e39f335e46d277d09455f5e4cd6cbfe0d755ec Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 4 Dec 2022 09:50:06 -0800
Subject: [PATCH] Only cancel previous builds when iterating on pull requests

---
 .github/workflows/android.yml    | 2 +-
 .github/workflows/emscripten.yml | 2 +-
 .github/workflows/ios.yml        | 2 +-
 .github/workflows/main.yml       | 2 +-
 .github/workflows/msvc.yml       | 2 +-
 .github/workflows/n3ds.yml       | 2 +-
 .github/workflows/ps2.yaml       | 2 +-
 .github/workflows/psp.yaml       | 2 +-
 .github/workflows/riscos.yml     | 2 +-
 .github/workflows/vita.yaml      | 2 +-
 .github/workflows/vmactions.yml  | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index a67d739f685d..b83da712e5ce 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -3,7 +3,7 @@ name: Build (Android)
 on: [push, pull_request]
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
   cancel-in-progress: true
 
 jobs:
diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml
index 834c56540ef7..2605e9beb163 100644
--- a/.github/workflows/emscripten.yml
+++ b/.github/workflows/emscripten.yml
@@ -3,7 +3,7 @@ name: Build (Emscripten)
 on: [push, pull_request]
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
   cancel-in-progress: true
 
 jobs:
diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml
index ba6368225322..fb92ecd182a5 100644
--- a/.github/workflows/ios.yml
+++ b/.github/workflows/ios.yml
@@ -3,7 +3,7 @@ name: Build (iOS/tvOS)
 on: [push, pull_request]
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
   cancel-in-progress: true
 
 jobs:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index c237cdf9a387..5cc488982f96 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -3,7 +3,7 @@ name: Build
 on: [push, pull_request]
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
   cancel-in-progress: true
 
 jobs:
diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml
index c1ff7347c6eb..0abfc50f5889 100644
--- a/.github/workflows/msvc.yml
+++ b/.github/workflows/msvc.yml
@@ -3,7 +3,7 @@ name: Build (MSVC)
 on: [push, pull_request]
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
   cancel-in-progress: true
 
 jobs:
diff --git a/.github/workflows/n3ds.yml b/.github/workflows/n3ds.yml
index 1e1a8d6be1be..9b11122f3bca 100644
--- a/.github/workflows/n3ds.yml
+++ b/.github/workflows/n3ds.yml
@@ -3,7 +3,7 @@ name: Build (Nintendo 3DS)
 on: [push, pull_request]
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
   cancel-in-progress: true
 
 jobs:
diff --git a/.github/workflows/ps2.yaml b/.github/workflows/ps2.yaml
index 9cacd920ccb1..a0f90201f570 100644
--- a/.github/workflows/ps2.yaml
+++ b/.github/workflows/ps2.yaml
@@ -3,7 +3,7 @@ name: Build (Sony Playstation 2)
 on: [push, pull_request]
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
   cancel-in-progress: true
 
 jobs:
diff --git a/.github/workflows/psp.yaml b/.github/workflows/psp.yaml
index 3564ebdcaee0..feade4e1ed72 100644
--- a/.github/workflows/psp.yaml
+++ b/.github/workflows/psp.yaml
@@ -3,7 +3,7 @@ name: Build (Sony Playstation Portable)
 on: [push, pull_request]
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
   cancel-in-progress: true
 
 jobs:
diff --git a/.github/workflows/riscos.yml b/.github/workflows/riscos.yml
index 3cb4bbf93c1e..d3ecc68b2a43 100644
--- a/.github/workflows/riscos.yml
+++ b/.github/workflows/riscos.yml
@@ -3,7 +3,7 @@ name: Build (RISC OS)
 on: [push, pull_request]
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
   cancel-in-progress: true
 
 jobs:
diff --git a/.github/workflows/vita.yaml b/.github/workflows/vita.yaml
index 3a06515b4b3b..fd0f306fb4fc 100644
--- a/.github/workflows/vita.yaml
+++ b/.github/workflows/vita.yaml
@@ -3,7 +3,7 @@ name: Build (Sony Playstation Vita)
 on: [push, pull_request]
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
   cancel-in-progress: true
 
 defaults:
diff --git a/.github/workflows/vmactions.yml b/.github/workflows/vmactions.yml
index 11eb29821985..a86cf1b3571b 100644
--- a/.github/workflows/vmactions.yml
+++ b/.github/workflows/vmactions.yml
@@ -3,7 +3,7 @@ name: Build (VM Actions)
 on: [push, pull_request]
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
   cancel-in-progress: true
 
 jobs: