From adf94aa904d3c73ca59b240cda586c99ca8ed50c Mon Sep 17 00:00:00 2001 From: Berry den Hartog <38954346+berrydenhartog@users.noreply.github.com> Date: Wed, 12 Jun 2024 08:59:37 +0200 Subject: [PATCH] Add concurrency check --- .github/workflows/ci.yml | 4 ++++ .github/workflows/deploy.yml | 6 +++++- .github/workflows/first-interaction.yml | 3 +++ .github/workflows/stale-pr-schedule.yml | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cdd05e87..3c0faeb73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,10 @@ on: branches: - 'main' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: REGISTRY: ghcr.io POETRY_CACHE_DIR: ~/.cache/pypoetry diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 031924cdb..392b3f329 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,5 +1,6 @@ name: deploy + on: push: branches: @@ -18,6 +19,10 @@ on: - stag - prod +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: deploy: runs-on: ubuntu-latest @@ -56,7 +61,6 @@ jobs: exit 1 fi - - name: Print deploy hash and environment run: | echo ${{ steps.get_package_hash.outputs }} diff --git a/.github/workflows/first-interaction.yml b/.github/workflows/first-interaction.yml index edad61194..9a34f7ed7 100644 --- a/.github/workflows/first-interaction.yml +++ b/.github/workflows/first-interaction.yml @@ -2,6 +2,9 @@ name: first-interaction on: [pull_request, issues] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + jobs: greeting: runs-on: ubuntu-latest diff --git a/.github/workflows/stale-pr-schedule.yml b/.github/workflows/stale-pr-schedule.yml index a695d5bb9..dfaabad35 100644 --- a/.github/workflows/stale-pr-schedule.yml +++ b/.github/workflows/stale-pr-schedule.yml @@ -4,6 +4,10 @@ on: - cron: "0 4 * * *" workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: stale: runs-on: ubuntu-latest