Added GitConfig in PHP

This commit is contained in:
Varun 2020-10-23 06:32:34 +05:30
parent a90fad3853
commit 6b0c063fca
No known key found for this signature in database
GPG key ID: 93FB46DCF16E0D6F
3 changed files with 9 additions and 1 deletions

View file

@ -3,7 +3,7 @@ name: "On Push"
on:
push:
branches:
- master
- main
jobs:
rebuild_dockers:

View file

@ -5,6 +5,10 @@ include_once '/gh-toolkit/gh-api.php';
global $github_api;
$data = $github_api->decode( $github_api->get( 'repos/' . gh_env( 'GITHUB_REPOSITORY' ) ) );
gh_gitconfig();
gh_gitconfig( 'AlpineOS', 'alpine@gmail.com' );
gh_log_group_start( 'Github API' );
gh_log( print_r( $data, true ) );
gh_log_group_end();

View file

@ -4,3 +4,7 @@ require_once __DIR__ . '/php/logger.php';
require_once __DIR__ . '/php/log-functions.php';
require_once __DIR__ . '/php/inputvar.php';
require_once __DIR__ . '/php/env.php';
function gh_gitconfig( $username = 'Github Action Bot', $email = 'githubactionbot@gmail.com' ) {
shell_exec( "gitconfig ${username} ${email}" );
}