mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 05:23:03 +07:00
Fail when runner it set to github on self-hosted environments
This commit is contained in:
parent
8b26e8d15a
commit
78532b17de
@ -53,6 +53,11 @@ read_env() {
|
|||||||
fail_fast="${fail_fast:-${FAIL_FAST:-false}}"
|
fail_fast="${fail_fast:-${FAIL_FAST:-false}}"
|
||||||
[[ -z "${ImageOS}" && -z "${ImageVersion}" ]] && _runner=self-hosted || _runner=github
|
[[ -z "${ImageOS}" && -z "${ImageVersion}" ]] && _runner=self-hosted || _runner=github
|
||||||
runner="${runner:-${RUNNER:-$_runner}}"
|
runner="${runner:-${RUNNER:-$_runner}}"
|
||||||
|
|
||||||
|
if [[ "$runner" = "github" && $_runner = "self-hosted" ]]; then
|
||||||
|
fail_fast=true
|
||||||
|
add_log "$cross" "Runner" "Runner set as github in self-hosted environment"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to download a file using cURL.
|
# Function to download a file using cURL.
|
||||||
|
@ -259,7 +259,11 @@ if ( $env:GITHUB_ACTIONS -eq 'true') {
|
|||||||
$env:END_GROUP = ''
|
$env:END_GROUP = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
if($env:RUNNER -eq 'self-hosted' -or (-not($env:ImageOS) -and -not($env:ImageVersion))) {
|
if(-not($env:ImageOS) -and -not($env:ImageVersion)) {
|
||||||
|
if($env:RUNNER -eq 'github') {
|
||||||
|
Add-Log $cross "Runner" "Runner set as github in self-hosted environment"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
$bin_dir = 'C:\tools\bin'
|
$bin_dir = 'C:\tools\bin'
|
||||||
$php_dir = "$php_dir$version"
|
$php_dir = "$php_dir$version"
|
||||||
$ext_dir = "$php_dir\ext"
|
$ext_dir = "$php_dir\ext"
|
||||||
|
Loading…
Reference in New Issue
Block a user