From 77170edc0d4be1b9cc2f9f9437e92632a3d2cd14 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Wed, 5 Jul 2023 22:56:51 -0400 Subject: [PATCH] Concurrency for workflows --- .github/workflows/lint.yml | 10 +++++++--- .github/workflows/release.yml | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 46192420..0b665187 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,7 +2,11 @@ name: Linter on: pull_request: - branches: [ "main" ] + branches: ["main"] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: lint: @@ -23,8 +27,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18.x - cache: 'npm' - + cache: "npm" + - name: Install dependencies run: npm ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c354bfe3..bd814aa1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,10 @@ on: push: branches: ["main"] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: release: runs-on: ubuntu-latest