Skip to content

Commit 6932b1c

Browse files
committed
Add concurrency settings
1 parent 40aefb0 commit 6932b1c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

pr-checks/sync.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ function main(): void {
156156
workflowInputs = checkSpecification.inputs;
157157
}
158158

159+
let extraGroupName = "";
160+
for (const inputName of Object.keys(workflowInputs)) {
161+
extraGroupName += "-${{inputs." + inputName + "}}";
162+
}
163+
159164
const workflow = {
160165
name: `PR Check - ${checkSpecification.name}`,
161166
env: {
@@ -185,6 +190,11 @@ function main(): void {
185190
shell: "bash",
186191
},
187192
},
193+
concurrency: {
194+
"cancel-in-progress":
195+
"${{ github.event_name == 'pull_request' || false }}",
196+
group: checkName + "-${{github.ref}}" + extraGroupName,
197+
},
188198
jobs: {
189199
[checkName]: checkJob,
190200
},

0 commit comments

Comments
 (0)