Skip to content

ci: replace auto-triggered native builds with comment-triggered slash commands#28

Merged
sunix merged 3 commits intomainfrom
copilot/disable-native-builds-in-pr
Apr 3, 2026
Merged

ci: replace auto-triggered native builds with comment-triggered slash commands#28
sunix merged 3 commits intomainfrom
copilot/disable-native-builds-in-pr

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 3, 2026

Native builds were running on every PR open/synchronize, consuming expensive macOS/Windows runners unconditionally. They should only run when explicitly requested.

Changes

  • Removed pull_request trigger from pr-build-native.yml — native builds no longer fire automatically on PR events
  • Added issue_comment trigger — workflow activates when a PR comment contains one of:
    • /build-native-linux → runs ubuntu-latest
    • /build-native-mac → runs macos-latest
    • /build-native-windows → runs windows-latest
  • Split matrix into 3 independent jobs (build-linux, build-mac, build-windows), each gated by github.event.issue.pull_request != null + comment body check — individual platforms can be triggered independently
  • Explicit PR head SHA checkout — fetches the PR's head.sha via the GitHub API before checkout, since issue_comment events carry no PR ref
  • Scoped permissions — added permissions: contents: read to all build jobs; comment and notify-start jobs use issues: write
  • Build status comments — a notify-start job immediately posts a "🚀 Native build starting" comment on the PR listing the triggered platforms and a link to the running job; the comment job then updates that same comment with per-platform ✅/❌ results, an artifact download link on success, or a log link on failure

Copilot AI changed the title [WIP] Disable native builds in pull requests ci: replace auto-triggered native builds with comment-triggered slash commands Apr 3, 2026
Copilot finished work on behalf of sunix April 3, 2026 21:08
Copilot AI requested a review from sunix April 3, 2026 21:08
@sunix
Copy link
Copy Markdown
Member

sunix commented Apr 3, 2026

/build-native-linux

@sunix
Copy link
Copy Markdown
Member

sunix commented Apr 3, 2026

@copilot should add a comment saying that it is starting with the job url, and update the same comment once it is done with the url link of the downloadable url, or saying that there is an error with the job url.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 3, 2026

📦 Native binaries available

The native binaries for this PR have been built and are available for download:

➡️ Download artifacts from this Actions run

Artifacts expire after 1 day.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 3, 2026

@copilot should add a comment saying that it is starting with the job url, and update the same comment once it is done with the url link of the downloadable url, or saying that there is an error with ...

Done in commit 0f0cfbb. Here's how it works now:

  1. On trigger — a new notify-start job immediately posts a comment like:

    🚀 Native build starting
    Building native binaries for: Linux
    ⏳ Build in progress... View job →

  2. On completion — the comment job updates that same comment with per-platform results:

    🏁 Native build results
    Linux: success
    ➡️ Download artifacts from this Actions run — Artifacts expire after 1 day.

    Or on failure:

    🏁 Native build results
    Linux: failure
    🔍 View job logs

Copilot finished work on behalf of sunix April 3, 2026 21:42
@sunix
Copy link
Copy Markdown
Member

sunix commented Apr 3, 2026

/build-native-linux

@sunix sunix marked this pull request as ready for review April 3, 2026 21:45
@sunix sunix merged commit 2e1ef19 into main Apr 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

disable native builds in PR, native builds in PR should be triggered with a comment /build-native-linux /build-native-mac /build-native-windows

2 participants