Skip to content

ci(hslinkpro): pass GITHUB_TOKEN to setup-riscv-gnu-toolchain - #91

Merged
HalfSweet merged 2 commits into
masterfrom
ci/fix-riscv-toolchain-setup
Nov 30, 2026
Merged

HalfSweet merged 2 commits into
masterfrom
ci/fix-riscv-toolchain-setup

Conversation

@HalfSweet

@HalfSweet HalfSweet commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The HSLinkPro Pipeline now fails at the gregdavill/setup-riscv-gnu-toolchain@v2.0 step, before any code is built:

curl: option : blank argument where content is expected
No suitable file found

ubuntu-latest has moved from ubuntu-24.04 to ubuntu-26.04. When GITHUB_TOKEN is not set, the action's install script sets GITHUB_TOKEN_AUTH="" and expands it as "${GITHUB_TOKEN_AUTH[@]}", which passes a single empty argument to curl. The newer curl on the 26.04 image rejects empty arguments, so the release lookup returns nothing. The last successful run (2026-09-14) was still on 24.04.

Fix

  • Pass GITHUB_TOKEN to the action step. The script then builds a proper --header "Authorization: Bearer ..." argument array instead of an empty argument, and the GitHub API lookup is authenticated (no anonymous rate limit). The toolchain version is unchanged: the action still resolves to the latest xPack release, currently v15.2.0-1, the same version used by the last successful run.
  • Fix the workflow's path filter, which still pointed at the old .github/workflows/HPM-build.yml. Because of that, edits to this workflow file never triggered it (including this PR).

Testing

Without a token the action passes an empty argument to curl, which the
curl on the ubuntu-26.04 runner image rejects, so no toolchain is found.
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The build workflow now passes secrets.GITHUB_TOKEN to the RISC-V toolchain setup step. A comment documents an empty-token issue with newer curl versions.

Changes: RISC-V toolchain setup

Layer / File(s) Summary
Pass token to toolchain setup
.github/workflows/HSLinkPro-build.yml
The setup step receives GITHUB_TOKEN from workflow secrets. A comment describes the empty-token issue with newer curl versions.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Merge Risk: Minimal · up to 3f5ba

This change gives the RISC-V toolchain setup step an authenticated GitHub token, which should fix the CI download failure on newer runner images. It affects only the build workflow and carries no apparent risk to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: the HSLinkPro workflow now passes GITHUB_TOKEN to the setup-riscv-gnu-toolchain step. The raw summary and objectives confirm this is the single main change, made to fix an …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the change: the HSLinkPro workflow now passes GITHUB_TOKEN to the setup-riscv-gnu-toolchain step. The raw summary and objectives confirm this is the single main change, made to fix an empty-token curl failure. The title is specific and uses the conventional ci(scope) form.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 30c9ea66-b50a-4650-b27c-f8175118aa7e
Commits

Reviewing files that changed from the base of the PR and between 67fb4b5 and 3f5ba86.

Files selected for processing: 1

  • .github/workflows/HSLinkPro-build.yml

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Deploying cherrydap with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3b84d6d
Status: ✅  Deploy successful!
Preview URL: https://d91199bf.cherrydap.pages.dev
Branch Preview URL: https://ci-fix-riscv-toolchain-setup.cherrydap.pages.dev

View logs

The path filter still pointed at the old HPM-build.yml, so changes to this
workflow file never triggered it.
@kaidegit

Copy link
Copy Markdown
Collaborator

这个有必要给secrets.GITHUB_TOKEN吗

@HalfSweet
HalfSweet merged commit c053096 into master Nov 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants