fix: add fallback to GITHUB_TOKEN for checkout token

- Use GH_PAT if available, otherwise fallback to GITHUB_TOKEN
- This prevents 'token not supplied' errors when GH_PAT is not configured
This commit is contained in:
yichuan520030910320
2025-12-24 12:16:15 +08:00
parent cbd6c8ab34
commit e5977e4c4f
3 changed files with 5 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 1
token: ${{ secrets.GH_PAT }}
token: ${{ secrets.GH_PAT || secrets.GITHUB_TOKEN }}
- name: Validate version
run: |
@@ -77,7 +77,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 1
token: ${{ secrets.GH_PAT }}
token: ${{ secrets.GH_PAT || secrets.GITHUB_TOKEN }}
ref: 'main'
- name: Download all artifacts