Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(ci): strip checkout extraheader when resolving cloud revision (#18686)

Inneic66135277e1e
diff --git a/.github/workflows/release-desktop-beta.yml b/.github/workflows/release-desktop-beta.yml
index 866eaa4a115..e00fe8b2cad 100644
--- a/.github/workflows/release-desktop-beta.yml
+++ b/.github/workflows/release-desktop-beta.yml
@@ -61,7 +61,8 @@ jobs:
CLOUD_TOKEN: ${{ secrets.LOBEHUB_CLOUD_TOKEN }}
run: |
set -euo pipefail
- cloud_ref=$(git ls-remote "https://x-access-token:${CLOUD_TOKEN}@github.com/lobehub/lobehub-cloud.git" HEAD | cut -f1)
+ # checkout persist-credentials extraheader would send GITHUB_TOKEN and 404 the private cloud repo
+ cloud_ref=$(git -c http.https://github.com/.extraheader= ls-remote "https://x-access-token:${CLOUD_TOKEN}@github.com/lobehub/lobehub-cloud.git" HEAD | cut -f1)
if [[ ! "$cloud_ref" =~ ^[0-9a-f]{40}$ ]]; then
echo "Unable to resolve Cloud revision"
exit 1
diff --git a/.github/workflows/release-desktop-canary.yml b/.github/workflows/release-desktop-canary.yml
index ecf5c4b577a..0e33959100c 100644
--- a/.github/workflows/release-desktop-canary.yml
+++ b/.github/workflows/release-desktop-canary.yml
@@ -130,7 +130,8 @@ jobs:
CLOUD_TOKEN: ${{ secrets.LOBEHUB_CLOUD_TOKEN }}
run: |
set -euo pipefail
- cloud_ref=$(git ls-remote "https://x-access-token:${CLOUD_TOKEN}@github.com/lobehub/lobehub-cloud.git" HEAD | cut -f1)
+ # checkout persist-credentials extraheader would send GITHUB_TOKEN and 404 the private cloud repo
+ cloud_ref=$(git -c http.https://github.com/.extraheader= ls-remote "https://x-access-token:${CLOUD_TOKEN}@github.com/lobehub/lobehub-cloud.git" HEAD | cut -f1)
if [[ ! "$cloud_ref" =~ ^[0-9a-f]{40}$ ]]; then
echo "Unable to resolve Cloud revision"
exit 1
diff --git a/.github/workflows/release-desktop-stable.yml b/.github/workflows/release-desktop-stable.yml
index 6aaee8383d8..ca5d5108602 100644
--- a/.github/workflows/release-desktop-stable.yml
+++ b/.github/workflows/release-desktop-stable.yml
@@ -127,7 +127,8 @@ jobs:
CLOUD_TOKEN: ${{ secrets.LOBEHUB_CLOUD_TOKEN }}
run: |
set -euo pipefail
- cloud_ref=$(git ls-remote "https://x-access-token:${CLOUD_TOKEN}@github.com/lobehub/lobehub-cloud.git" HEAD | cut -f1)
+ # checkout persist-credentials extraheader would send GITHUB_TOKEN and 404 the private cloud repo
+ cloud_ref=$(git -c http.https://github.com/.extraheader= ls-remote "https://x-access-token:${CLOUD_TOKEN}@github.com/lobehub/lobehub-cloud.git" HEAD | cut -f1)
if [[ ! "$cloud_ref" =~ ^[0-9a-f]{40}$ ]]; then
echo "Unable to resolve Cloud revision"
exit 1