diff --git a/.github/workflows/sycl-post-commit.yml b/.github/workflows/sycl-post-commit.yml index 1abd497a9c97c..15c66c8d4bdfa 100644 --- a/.github/workflows/sycl-post-commit.yml +++ b/.github/workflows/sycl-post-commit.yml @@ -20,8 +20,11 @@ on: - ./devops/actions/cached_checkout concurrency: - # Cancel a currently running workflow from the same PR or commit hash. - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + # Cancel a currently running workflow from the same PR or commit hash. + # We need to use the user's branch name (which is in different variables + # for pull request events and push events) so that making a PR from a + # sycl-devops-pr branch doesn't cause two postcommit runs. + group: "${{ github.actor }}-${{ github.head_ref || github.ref_name }}" cancel-in-progress: true permissions: read-all