From d188dfcf4910071ab135e9ea146eec89d0980608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ord=C3=A1s?= <3125580+davorpa@users.noreply.github.com> Date: Sun, 4 Sep 2022 05:35:39 +0200 Subject: [PATCH] fix: concurrency and job atomicity --- .github/workflows/stale.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 19f79be76..2c3950ed1 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -11,7 +11,7 @@ permissions: # This allows a subsequently queued workflow run to interrupt previous runs concurrency: - group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref || github.run_id }}' + group: '${{ github.workflow }} @ ${{ github.run_id }}' cancel-in-progress: true jobs: @@ -19,6 +19,15 @@ jobs: process-issues: name: Process Issues + # This allows a subsequently queued workflow run to wait for previous runs completion + concurrency: + group: '${{ github.workflow }} @ ${{ github.run_id }} :: issues' + cancel-in-progress: false + + outputs: + staled-issues: ${{ steps.staler.outputs.staled-issues-prs }} + closed-issues: ${{ steps.staler.outputs.closed-issues-prs }} + permissions: issues: write @@ -51,6 +60,15 @@ jobs: process-prs: name: Process Pull Requests + # This allows a subsequently queued workflow run to wait for previous runs completion + concurrency: + group: '${{ github.workflow }} @ ${{ github.run_id }} :: PRs' + cancel-in-progress: false + + outputs: + staled-prs: ${{ steps.staler.outputs.staled-issues-prs }} + closed-prs: ${{ steps.staler.outputs.closed-issues-prs }} + permissions: pull-requests: write