Skip to content

feat(xtask): add cargo act command with improved PATH handling#18

Merged
zouguangxian merged 1 commit intodevfrom
gx/cargo-act
Jan 19, 2026
Merged

feat(xtask): add cargo act command with improved PATH handling#18
zouguangxian merged 1 commit intodevfrom
gx/cargo-act

Conversation

@zouguangxian
Copy link
Copy Markdown
Collaborator

@zouguangxian zouguangxian commented Jan 15, 2026

This PR adds improve cargo act subcommand to run GitHub Actions workflows locally using nektos/act.

Changes

  • Smart PATH augmentation: Appends ~/.local/bin and ~/bin to PATH as fallback (doesn't override existing binaries)
  • Documentation: Added new README section "Run CI locally (act)" with installation guidance

Usage

cargo act pull_request

…tion guide

- Add cargo act subcommand to run GitHub Actions locally via nektos/act
- Implement PATH augmentation to append ~/.local/bin and ~/bin for local CLI discovery
- Add REMOTE_CONTAINERS_IPC injection for dev containers credential helper compatibility
- Update README with new 'Run CI locally (act)' section including installation link
- Update bootstrap script with shell reload instructions
Copy link
Copy Markdown

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

This PR adds a cargo act subcommand for running GitHub Actions workflows locally with improved PATH handling and documentation.

Changes:

  • Implements smart PATH augmentation that appends ~/.local/bin and ~/bin as fallbacks without overriding existing binaries
  • Adds documentation section for running CI locally with act installation guidance
  • Includes minor shell reload instruction improvement in bootstrap script

Reviewed changes

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

File Description
xtask/src/act.rs Adds helper functions to append home bin directories to PATH for better local CLI discovery
bootstrap Adds alternative shell reload instruction for user convenience
README.md Adds "Run CI locally (act)" section with installation link and usage example, reformats existing design principles text

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

Comment thread README.md

### Run CI locally (act)

To install `act`, visit <https://nektosact.com/> for installation instructions.
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

Corrected spelling of 'nektosact.com' to 'nektos/act.com' or the correct domain.

Suggested change
To install `act`, visit <https://nektosact.com/> for installation instructions.
To install `act`, visit <https://github.com/nektos/act> for installation instructions.

Copilot uses AI. Check for mistakes.
Comment thread bootstrap
log "Shell integration installed into ~/.bashrc and/or ~/.zshrc"
fi
log "Please restart your shell or run 'direnv allow' to activate the environment."
log " or run 'exec \$SHELL -l' to reload your shell."
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

The indentation uses spaces instead of a tab, inconsistent with the line above (line 444). Shell scripts in this file appear to use tabs for indentation.

Copilot uses AI. Check for mistakes.
@zouguangxian zouguangxian changed the base branch from main to dev January 18, 2026 07:33
@zouguangxian zouguangxian merged commit c3fd02f into dev Jan 19, 2026
15 checks passed
@zouguangxian zouguangxian deleted the gx/cargo-act branch January 19, 2026 07:50
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.

2 participants