Skip to content

Conversation

@samdark
Copy link
Member

@samdark samdark commented Jun 14, 2025

Q A
Is bugfix?
New feature? ✔️
Breaks BC?
Fixed issues -
@samdark
Copy link
Member Author

samdark commented Jun 14, 2025

Does not work with our actions:

time="2025-06-15T00:15:45+03:00" level=error msg="Error while evaluating matrix: Invalid JSON: invalid character '\\'' looking for beginning of value" time="2025-06-15T00:15:45+03:00" level=fatal msg="Failed to decode node {4 0 !!map <nil> [0xc00049ca00 0xc00049caa0 0xc00049cb40 0xc00049cbe0] 50 9} into *map[string][]interface {}: yaml: unmarshal errors:\n line 50: cannot unmarshal !!str `${{ fro...` into []interface {}\n line 51: cannot unmarshal !!str `${{ fro...` into []interface {}" 

nektos/act#2313

@samdark samdark requested a review from Copilot June 14, 2025 21:23
Copy link

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 new act command to run GitHub Actions locally using the act binary, updates the application to register it, and applies minor punctuation fixes in the README.

  • Introduces ActCommand to invoke the local act tool per package
  • Registers ActCommand in the default console commands list
  • Cleans up README grammar and punctuation

Reviewed Changes

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

File Description
src/App/YiiDevToolApplication.php Added import and registration of ActCommand
src/App/Command/ActCommand.php New command implementation for running local GitHub actions
README.md Minor punctuation and grammar corrections
Comments suppressed due to low confidence (1)

src/App/Command/ActCommand.php:18

  • Consider adding unit or integration tests for ActCommand to cover both successful and failure scenarios (e.g., binary missing, action failures) and ensure consistent behavior.
protected function processPackage(Package $package): void 
$io->preparePackageHeader($package, 'Running actions on {package}');

$actBinary = dirname(__DIR__, 3) . '/bin/act';

Copy link

Copilot AI Jun 14, 2025

Choose a reason for hiding this comment

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

Validate that the act binary exists at this path and is executable before invoking the process, so you can provide a clear and immediate error if it's missing or not executable.

Suggested change
if (!file_exists($actBinary) || !is_executable($actBinary)) {
$io
->important()
->error(<<<ERROR
$actBinary does not exist or is not executable. Ensure the binary is installed and has the correct permissions.
Use the following to install it:
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
ERROR);
exit(1);
}
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Rustam Mamadaminov <rmamdaminov@gmail.com>
@samdark samdark closed this Jun 15, 2025
@samdark
Copy link
Member Author

samdark commented Jun 15, 2025

Won't work this way, it seems.

@samdark samdark deleted the run-actions branch June 15, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants