From 71652656fd87514bd47198eb1fef315faa2d566d Mon Sep 17 00:00:00 2001 From: Nara Kasbergen Date: Wed, 28 Aug 2024 13:35:33 +0200 Subject: [PATCH] chore(ci): fix syntax for concurrency in workflows --- .github/workflows/auto-approve.yml | 3 ++- .github/workflows/automerge.yml | 3 ++- .github/workflows/upgrade-cdktf.yml | 3 ++- projenrc/auto-approve.ts | 5 +++-- projenrc/automerge.ts | 5 +++-- projenrc/upgrade-cdktf.ts | 4 +++- 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index f7dc050..1636b6f 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -8,7 +8,8 @@ on: - labeled - ready_for_review - reopened -concurrency: {} +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} jobs: approve: runs-on: ubuntu-latest diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 923c133..b027076 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -9,7 +9,8 @@ on: - ready_for_review - reopened - synchronize -concurrency: {} +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} jobs: automerge: runs-on: ubuntu-latest diff --git a/.github/workflows/upgrade-cdktf.yml b/.github/workflows/upgrade-cdktf.yml index 6fc3926..2eed38d 100644 --- a/.github/workflows/upgrade-cdktf.yml +++ b/.github/workflows/upgrade-cdktf.yml @@ -5,7 +5,8 @@ on: schedule: - cron: 35 */6 * * * workflow_dispatch: {} -concurrency: {} +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} jobs: upgrade: name: Upgrade CDKTF diff --git a/projenrc/auto-approve.ts b/projenrc/auto-approve.ts index b560b4b..29d0f42 100644 --- a/projenrc/auto-approve.ts +++ b/projenrc/auto-approve.ts @@ -21,8 +21,9 @@ export class AutoApprove { }, }); - (workflow.concurrency as any) = - "${{ github.workflow }}-${{ github.head_ref }}"; + (workflow.concurrency as any) = { + group: "${{ github.workflow }}-${{ github.ref }}", + }; const maintainerStatuses = `fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]')`; workflow.addJobs({ diff --git a/projenrc/automerge.ts b/projenrc/automerge.ts index b97534d..c710617 100644 --- a/projenrc/automerge.ts +++ b/projenrc/automerge.ts @@ -27,8 +27,9 @@ export class Automerge { }, }); - (workflow.concurrency as any) = - "${{ github.workflow }}-${{ github.head_ref }}"; + (workflow.concurrency as any) = { + group: "${{ github.workflow }}-${{ github.ref }}", + }; const maintainerStatuses = `fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]')`; workflow.addJobs({ diff --git a/projenrc/upgrade-cdktf.ts b/projenrc/upgrade-cdktf.ts index 28d30e7..3df1aff 100644 --- a/projenrc/upgrade-cdktf.ts +++ b/projenrc/upgrade-cdktf.ts @@ -20,7 +20,9 @@ export class UpgradeCDKTF { workflowDispatch: {}, // allow manual triggering }); - (workflow.concurrency as any) = "${{ github.workflow }}-${{ github.ref }}"; + (workflow.concurrency as any) = { + group: "${{ github.workflow }}-${{ github.ref }}", + }; workflow.addJobs({ upgrade: {