actions-toolkit/toolkit/php.php

17 lines
767 B
PHP
Raw Normal View History

2020-10-21 12:53:04 +08:00
<?php
2020-11-02 12:31:17 +08:00
global $GITHUB_EVENT;
2020-10-21 12:53:04 +08:00
2020-10-29 22:34:01 +08:00
require_once __DIR__ . '/php/util.php';
2020-10-21 13:26:08 +08:00
require_once __DIR__ . '/php/logger.php';
2020-10-21 15:57:49 +08:00
require_once __DIR__ . '/php/log-functions.php';
2020-10-21 16:21:40 +08:00
require_once __DIR__ . '/php/inputvar.php';
2020-10-29 22:34:01 +08:00
require_once __DIR__ . '/php/env.php';
2020-11-02 12:31:17 +08:00
require_once __DIR__ . '/php/general-functions.php';
2020-11-02 12:56:36 +08:00
define( 'GITHUB_REPOSITORY', gh_env( 'GITHUB_REPOSITORY' ) . '/' );
2020-11-02 12:31:17 +08:00
define( 'GH_WORKSPACE', gh_env( 'GITHUB_WORKSPACE' ) . '/' );
define( 'GH_REF_BRANCH', trim( str_replace( 'refs/heads/', '', gh_env( 'GITHUB_REF' ) ) ) );
$gh_event_path_file = gh_env( 'GITHUB_EVENT_PATH' );
$GITHUB_EVENT = ( file_exists( $gh_event_path_file ) ) ? json_decode( $gh_event_path_file, true ) : false;
$GITHUB_EVENT = ( ! is_array( $GITHUB_EVENT ) ) ? array() : $GITHUB_EVENT;