Check GITHUB_TOKEN in workflow

This commit is contained in:
crazywhalecc
2025-05-20 23:26:36 +08:00
parent 9fffc92db7
commit 0c311439f1
2 changed files with 7 additions and 1 deletions

View File

@@ -142,6 +142,13 @@ jobs:
os: ${{ fromJSON(needs.define-matrix.outputs.os) }}
fail-fast: false
steps:
- name: "Check GITHUB_TOKEN is set"
run: |
if [ -z "${{ secrets.GITHUB_TOKEN }}" ]; then
echo "GITHUB_TOKEN is not set. Exiting."
exit 1
fi
- name: "Checkout"
uses: actions/checkout@v4

View File

@@ -18,7 +18,6 @@ class CurlHook
$token = getenv('GITHUB_TOKEN');
if (!$token) {
logger()->debug('no github token found, skip');
var_dump($token);
return;
}
if (getenv('GITHUB_USER')) {