Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

Pull requests were triggering duplicate workflow runs—once for pull_request and once for push to the PR branch. Jobs like dry-run-semantic-release and release-build-version were appearing with both (pull_request) and (push) suffixes.

Changes

Changed workflow triggers in build.yml and infersharp.yml:

# Before
on: [push, pull_request]

# After  
on:
  push:
    branches:
      - master
      - main
      - 1.x
  pull_request:

This restricts push triggers to main branches only. PRs now run once via pull_request event. Direct pushes and merged PRs trigger via push event as expected.

Original prompt

This section details on the original issue you should resolve

<issue_title>[bug] needs to fix CI for strange duplicated checks in PR</issue_title>
<issue_description>The following duplicated CI checks ran in this open PR: #392

[Build / build (pull_request)](https://github.com/casbin/Casbin.NET/actions/runs/18989849083/job/54240566726?pr=392)Successful in 5m
[Build / build (push)](https://github.com/casbin/Casbin.NET/actions/runs/18989848647/job/54240566485?pr=392)
Build / build (push)Successful in 5m
[Build / dry-run-semantic-release (push)](https://github.com/casbin/Casbin.NET/actions/runs/18989848647/job/54240741075?pr=392)
Build / dry-run-semantic-release (push)Successful in 23s
[Build / release-build-version (push)](https://github.com/casbin/Casbin.NET/actions/runs/18989848647/job/54240741078?pr=392)
Build / release-build-version (push)Successful in 4m
[casbin.Casbin.NET](https://github.com/casbin/Casbin.NET/pull/392/checks?check_run_id=54240796274)
casbin.Casbin.NETSuccessful in 8m — Build casbin/Casbin.NET#20251101.1 succeeded
[InferSharp / InferSharp (pull_request)](https://github.com/casbin/Casbin.NET/actions/runs/18989849067/job/54240566732?pr=392)
InferSharp / InferSharp (pull_request)Successful in 3m
[InferSharp / InferSharp (push)](https://github.com/casbin/Casbin.NET/actions/runs/18989848657/job/54240566735?pr=392)
InferSharp / InferSharp (push)Successful in 3m

I think for an open state PR, it should not run "XXX (push)" checks, right? It should run for the git push after PR merge?
Need to fix the CI.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@CLAassistant
Copy link

CLAassistant commented Nov 1, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ hsluoyz
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI changed the title [WIP] Fix CI for strange duplicated checks in PR Fix duplicate CI workflow runs on pull requests Nov 1, 2025
Copilot AI requested a review from hsluoyz November 1, 2025 02:34
Copilot finished work on behalf of hsluoyz November 1, 2025 02:34
@hsluoyz hsluoyz marked this pull request as ready for review November 1, 2025 02:54
@hsluoyz hsluoyz changed the title Fix duplicate CI workflow runs on pull requests feat: fix duplicate CI workflow runs on pull requests Nov 1, 2025
@hsluoyz hsluoyz merged commit e9b080e into master Nov 1, 2025
3 of 6 checks passed
@github-actions
Copy link

github-actions bot commented Nov 1, 2025

🎉 This PR is included in version 2.18.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] needs to fix CI for strange duplicated checks in PR

3 participants