PHP code example of owenvoke / gha-interactions
1. Go to this page and download the library: Download owenvoke/gha-interactions library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
owenvoke / gha-interactions example snippets
namespace App\Commands;
use LaravelZero\Framework\Commands\Command;
use OwenVoke\GHAInteractions\Concerns\InteractsWithGitHubActionsAnnotations;
class MyCommand extends Command
{
use InteractsWithGitHubActionsAnnotations;
protected $signature = 'test';
public function handle()
{
// Add a debug message to the GitHub Actions log output
$this->addGitHubActionsDebugMessage('Debug');
// Add an error message to the GitHub Actions log output
$this->addGitHubActionsErrorMessage('Error!');
// Add a warning message to the GitHub Actions log output
$this->addGitHubActionsWarningMessage('Warning!');
// Add a group of messages to the GitHub Actions log output
$this->addGitHubActionsGroupedLogMessage('Group Title', ['Message 1', 'Message 2']);
// Add an output parameter to the GitHub Actions log output
$this->addGitHubActionsOutputParameter('output_param', 'output_value');
}
}