ci: Add concurrency functionality
authorjuan-lunarg <juan@lunarg.com>
Fri, 5 May 2023 17:22:11 +0000 (11:22 -0600)
committerJuan Ramos <114601453+juan-lunarg@users.noreply.github.com>
Fri, 5 May 2023 23:50:11 +0000 (17:50 -0600)
.github/workflows/build.yml

index 6041dd5234c6087e03589ea1816ed6388ba3ded1..dafc5271d900ff780643ee33f2e8783c52c5a84a 100644 (file)
 
 name: CI Build
 
+# https://docs.github.com/en/actions/using-jobs/using-concurrency
+concurrency:
+  # github.head_ref is only defined on pull_request
+  # Fallback to the run ID, which is guaranteed to be both unique and defined for the run.
+  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id  }}
+  cancel-in-progress: true
+
 on:
     push:
     pull_request: