From 2f6dae5f8caaef6471b84952b236b8923926f209 Mon Sep 17 00:00:00 2001 From: Tanya Date: Wed, 7 Jan 2026 15:31:18 -0500 Subject: [PATCH] chore: Update CI workflow to prevent duplicate runs for push and PR events This commit modifies the CI workflow configuration to group runs by workflow name and either PR number or branch name. This change prevents duplicate runs when both push and PR events are triggered for the same commit, enhancing the efficiency of the CI process. --- .gitea/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 8dd954f..7fe8f06 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -10,7 +10,11 @@ on: # Prevent duplicate runs when pushing to a branch with an open PR # This ensures only one workflow runs at a time for the same branch/PR concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.pull_request.number || github.sha }} + # Group by workflow name and either PR number (for PRs) or branch name (for pushes) + # This prevents duplicate runs when both push and PR events fire for the same commit + # For PRs: uses PR number to group all runs for that PR + # For pushes: uses branch ref to group all runs for that branch + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: