Compare commits

...

3 Commits

Author SHA1 Message Date
yichuan520030910320
ae29ae9b88 fix: use proper conditional expression for token fallback
- Use conditional expression to check if GH_PAT exists before using it
- Fallback to GITHUB_TOKEN if GH_PAT is not set or empty
- This fixes the 'token not supplied' error
2025-12-24 12:16:38 +08:00
yichuan520030910320
e5977e4c4f 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
2025-12-24 12:16:15 +08:00
yichuan520030910320
cbd6c8ab34 feat: add GH_PAT token and fetch-depth to GitHub Actions workflows
- Add fetch-depth: 1 to all checkout actions for faster checkout
- Add token: ${{ secrets.GH_PAT }} to all checkout actions
- This enables access to private submodules and improves checkout performance
2025-12-24 12:14:51 +08:00
3 changed files with 14 additions and 2 deletions

View File

@@ -16,8 +16,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
ref: ${{ inputs.ref }}
submodules: recursive submodules: recursive
fetch-depth: 1
token: ${{ secrets.GH_PAT != '' && secrets.GH_PAT || secrets.GITHUB_TOKEN }}
ref: ${{ inputs.ref }}
- name: Install uv and Python - name: Install uv and Python
uses: astral-sh/setup-uv@v6 uses: astral-sh/setup-uv@v6
@@ -91,8 +93,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
with: with:
ref: ${{ inputs.ref }}
submodules: recursive submodules: recursive
fetch-depth: 1
token: ${{ secrets.GH_PAT != '' && secrets.GH_PAT || secrets.GITHUB_TOKEN }}
ref: ${{ inputs.ref }}
- name: Install uv and Python - name: Install uv and Python
uses: astral-sh/setup-uv@v6 uses: astral-sh/setup-uv@v6

View File

@@ -12,6 +12,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
fetch-depth: 1
token: ${{ secrets.GH_PAT != '' && secrets.GH_PAT || secrets.GITHUB_TOKEN }}
- uses: lycheeverse/lychee-action@v2 - uses: lycheeverse/lychee-action@v2
with: with:
args: --no-progress --insecure --user-agent 'curl/7.68.0' --exclude '.*api\.star-history\.com.*' --accept 200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308,503 README.md docs/ apps/ examples/ benchmarks/ args: --no-progress --insecure --user-agent 'curl/7.68.0' --exclude '.*api\.star-history\.com.*' --accept 200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308,503 README.md docs/ apps/ examples/ benchmarks/

View File

@@ -19,6 +19,9 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
fetch-depth: 1
token: ${{ secrets.GH_PAT != '' && secrets.GH_PAT || secrets.GITHUB_TOKEN }}
- name: Validate version - name: Validate version
run: | run: |
@@ -73,6 +76,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 1
token: ${{ secrets.GH_PAT != '' && secrets.GH_PAT || secrets.GITHUB_TOKEN }}
ref: 'main' ref: 'main'
- name: Download all artifacts - name: Download all artifacts