mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Adjust caches
This commit is contained in:
parent
ecb17cc4c9
commit
c09bf1e878
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@ -171,7 +171,7 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: downloads
|
path: downloads
|
||||||
key: php-${{ matrix.php }}-dependencies
|
key: php-dependencies-${{ matrix.os }}
|
||||||
|
|
||||||
- name: "Install Dependencies"
|
- name: "Install Dependencies"
|
||||||
run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
|
run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
|
||||||
|
|||||||
@ -20,11 +20,17 @@ class CurlHook
|
|||||||
}
|
}
|
||||||
if (getenv('GITHUB_USER')) {
|
if (getenv('GITHUB_USER')) {
|
||||||
$auth = base64_encode(getenv('GITHUB_USER') . ':' . getenv('GITHUB_TOKEN'));
|
$auth = base64_encode(getenv('GITHUB_USER') . ':' . getenv('GITHUB_TOKEN'));
|
||||||
$headers[] = "Authorization: Basic {$auth}";
|
$he = "Authorization: Basic {$auth}";
|
||||||
|
if (!in_array($he, $headers)) {
|
||||||
|
$headers[] = $he;
|
||||||
|
}
|
||||||
logger()->info("using basic github token for {$method} {$url}");
|
logger()->info("using basic github token for {$method} {$url}");
|
||||||
} else {
|
} else {
|
||||||
$auth = getenv('GITHUB_TOKEN');
|
$auth = getenv('GITHUB_TOKEN');
|
||||||
$headers[] = "Authorization: Bearer {$auth}";
|
$he = "Authorization: Bearer {$auth}";
|
||||||
|
if (!in_array($he, $headers)) {
|
||||||
|
$headers[] = $he;
|
||||||
|
}
|
||||||
logger()->info("using bearer github token for {$method} {$url}");
|
logger()->info("using bearer github token for {$method} {$url}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user