Browse Source

ci(openapi-diff): Limit concurrency of the open api diff on PRs (#38887)

Matt Gaunt-Seo @ Sentry.io 2 years ago
parent
commit
a8e85748a1
1 changed files with 6 additions and 0 deletions
  1. 6 0
      .github/workflows/openapi-diff.yml

+ 6 - 0
.github/workflows/openapi-diff.yml

@@ -2,6 +2,12 @@ name: openapi-diff
 on:
   pull_request:
 
+# Cancel in progress workflows on pull_requests.
+# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
+concurrency:
+  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+  cancel-in-progress: true
+
 # hack for https://github.com/actions/cache/issues/810#issuecomment-1222550359
 env:
   SEGMENT_DOWNLOAD_TIMEOUT_MIN: 3