Skip to content

Commit 819f76a

Browse files
committed
Use gh CLI to clone hash repo in workflow
In the release workflow, replace the token-based git clone URL with the GitHub CLI command. Removed the CLONE_URL variable and now run `gh repo clone NapNeko/napcat-release-hash hash-repo`, avoiding embedding GH_TOKEN in the clone URL and relying on gh authentication for a cleaner, more secure clone.
1 parent 938074c commit 819f76a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,8 @@ jobs:
485485
set -euo pipefail
486486
VERSION="${GITHUB_REF#refs/tags/}"
487487
HASH_REPO="NapNeko/napcat-release-hash"
488-
CLONE_URL="https://x-access-token:${GH_TOKEN}@github.com/${HASH_REPO}.git"
489488
490-
git clone "$CLONE_URL" hash-repo
489+
gh repo clone "$HASH_REPO" hash-repo
491490
492491
node .github/scripts/publish-release-hash.mjs \
493492
--version "$VERSION" \

0 commit comments

Comments
 (0)