Skip to content

feat: use action mode for release builds instead of release mode#21024

Merged
pelikhan merged 2 commits intomainfrom
copilot/update-action-pin-mode
Mar 15, 2026
Merged

feat: use action mode for release builds instead of release mode#21024
pelikhan merged 2 commits intomainfrom
copilot/update-action-pin-mode

Conversation

Copy link
Contributor

Copilot AI commented Mar 15, 2026

Summary

Changes DetectActionMode to return ActionModeAction instead of ActionModeRelease for release builds. This means compiled workflows for release binaries will reference actions from github/gh-aw-actions (the external actions repo) rather than github/gh-aw (the main repo).

Changes

  • pkg/workflow/action_mode.go: Updated DetectActionMode to return ActionModeAction when:
    • isReleaseBuild=true (binary built with release flag via -X main.isRelease=true)
    • Running in GitHub Actions release context (release tags refs/tags/*, release branches refs/heads/release*, or release event)
  • pkg/workflow/compiler_action_mode_test.go: Updated test expectations to match new ActionModeAction return value for all release scenarios

Security Summary

No security vulnerabilities introduced or discovered.

Copilot AI and others added 2 commits March 15, 2026 04:17
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan March 15, 2026 04:27
@pelikhan pelikhan marked this pull request as ready for review March 15, 2026 04:27
Copilot AI review requested due to automatic review settings March 15, 2026 04:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Changes DetectActionMode to return ActionModeAction instead of ActionModeRelease for release builds, so compiled workflows reference actions from the external actions repo.

Changes:

  • Updated DetectActionMode to return ActionModeAction for release flag and GitHub Actions release context
  • Updated tests to expect ActionModeAction instead of ActionModeRelease

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/workflow/action_mode.go Changed return value from ActionModeRelease to ActionModeAction for release conditions
pkg/workflow/compiler_action_mode_test.go Updated test expectations to match new return values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@pelikhan pelikhan merged commit 780f3f0 into main Mar 15, 2026
87 checks passed
@pelikhan pelikhan deleted the copilot/update-action-pin-mode branch March 15, 2026 04:31
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.

3 participants