Skip to content

Conversation

azu
Copy link
Member

@azu azu commented Aug 16, 2025

Summary

  • Improved GitHub Actions workflow configuration to prevent duplicate runs
  • Configured push events to only trigger on master branch
  • Pull request events continue to run for all branches

Changes

  • Modified .github/workflows/test.yml to use structured event configuration
  • Push events now only trigger on master branch
  • Pull request events remain unrestricted (run on all branches)

Why this change?

When a pull request is created from a branch within the same repository, the workflow was running twice:

  1. Once for the push event
  2. Once for the pull_request event

This change ensures the workflow runs only once per PR by limiting push events to the master branch only.

Test plan

  • Tests pass locally
  • YAML syntax is valid
  • Workflow runs correctly on PR creation
  • Workflow runs correctly on push to master

Fixes #162

🤖 Generated with Claude Code

- Limit push events to master branch only
- Keep pull_request events for all branches
- This prevents duplicate workflow runs when PRs are created from repository branches

Fixes #162

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@azu azu added the Type: CI Changes to CI configuration files and scripts label Aug 16, 2025
@azu azu marked this pull request as ready for review August 16, 2025 04:56
@azu azu merged commit a2fa689 into master Aug 16, 2025
6 checks passed
@azu azu deleted the improve-workflow-triggers branch August 16, 2025 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: CI Changes to CI configuration files and scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improve workflow push, pull_request

1 participant