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.
This commit is contained in:
1 parent
938074c654
commit
819f76afbf
1 file changed
+1
-2
@@ -485,9 +485,8 @@ jobs:
|
||||
set -euo pipefail
|
||||
VERSION="${GITHUB_REF#refs/tags/}"
|
||||
HASH_REPO="NapNeko/napcat-release-hash"
|
||||
CLONE_URL="https://x-access-token:${GH_TOKEN}@github.com/${HASH_REPO}.git"
|
||||
|
||||
git clone "$CLONE_URL" hash-repo
|
||||
gh repo clone "$HASH_REPO" hash-repo
|
||||
|
||||
node .github/scripts/publish-release-hash.mjs \
|
||||
--version "$VERSION" \
|
||||
|
||||
Reference in new issue
Block a user