Skip to content

Commit 6098496

Browse files
simonrosenbergallhands-botall-hands-bot
authored
chore: use OPENHANDS_BOT_GITHUB_PAT_INSTALL_WEBSITE for install-openhands-website (#691)
* chore: use OPENHANDS_BOT_GITHUB_PAT_PUBLIC in update-install-website.yml * Update .github/workflows/update-install-website.yml Co-authored-by: OpenHands Bot <contact@all-hands.dev> * Update .github/workflows/update-install-website.yml Co-authored-by: OpenHands Bot <contact@all-hands.dev> * Update .github/workflows/update-install-website.yml Co-authored-by: OpenHands Bot <contact@all-hands.dev> * chore: use OPENHANDS_BOT_GITHUB_PAT_INSTALL_WEBSITE for install-website workflow * chore: use OPENHANDS_BOT_GITHUB_PAT_INSTALL_WEBSITE for install-website workflow * chore: force workflow re-index * fix: use OPENHANDS_BOT_GITHUB_PAT_INSTALL_WEBSITE and OpenHands org --------- Co-authored-by: allhands-bot <allhands-bot@users.noreply.github.com> Co-authored-by: OpenHands Bot <contact@all-hands.dev>
1 parent 3066650 commit 6098496

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

.github/workflows/update-install-website.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
---
22
# Workflow that updates the install-openhands-website repository when a release is published
3-
# TODO: Once All-Hands-AI/install-openhands-website is migrated to the OpenHands org,
4-
# replace secrets.PAT_TOKEN here with secrets.OPENHANDS_BOT_GITHUB_PAT_PUBLIC
5-
# and add the new repo to the PAT's allowlist. Tracked in OpenHands/OpenHands-CLI#689.
63
name: Update Install Website Version
74

85
# Trigger when a release is published (not draft) or manually
@@ -16,8 +13,6 @@ on:
1613
required: true
1714
type: string
1815

19-
# Note: This workflow requires PAT_TOKEN secret to have access to the All-Hands-AI/install-openhands-website repository
20-
# Create a Personal Access Token (PAT) with repo permissions and store it as PAT_TOKEN in repository secrets
2116
permissions:
2217
contents: read
2318

@@ -47,8 +42,8 @@ jobs:
4742
4843
- name: Clone install-openhands-website repository
4944
run: |
50-
# Use PAT_TOKEN to clone the repository
51-
git clone https://${{ secrets.PAT_TOKEN }}@github.com/All-Hands-AI/install-openhands-website.git website-repo
45+
# Use OPENHANDS_BOT_GITHUB_PAT_INSTALL_WEBSITE to clone the repository
46+
git clone https://${{ secrets.OPENHANDS_BOT_GITHUB_PAT_INSTALL_WEBSITE }}@github.com/OpenHands/install-openhands-website.git website-repo
5247
cd website-repo
5348
git config user.name "github-actions[bot]"
5449
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
@@ -85,9 +80,9 @@ jobs:
8580
run: |
8681
# Check if a PR already exists for this version
8782
EXISTING_PR=$(curl -s \
88-
-H "Authorization: token ${{ secrets.PAT_TOKEN }}" \
83+
-H "Authorization: token ${{ secrets.OPENHANDS_BOT_GITHUB_PAT_INSTALL_WEBSITE }}" \
8984
-H "Accept: application/vnd.github.v3+json" \
90-
"https://api.github.com/repos/All-Hands-AI/install-openhands-website/pulls?state=open&head=update-version-${{ steps.extract_version.outputs.version }}" \
85+
"https://api.github.com/repos/OpenHands/install-openhands-website/pulls?state=open&head=update-version-${{ steps.extract_version.outputs.version }}" \
9186
| jq -r '.[0].html_url // "null"')
9287
9388
if [ "$EXISTING_PR" != "null" ]; then
@@ -107,9 +102,9 @@ jobs:
107102
108103
# Create PR using GitHub API
109104
curl -X POST \
110-
-H "Authorization: token ${{ secrets.PAT_TOKEN }}" \
105+
-H "Authorization: token ${{ secrets.OPENHANDS_BOT_GITHUB_PAT_INSTALL_WEBSITE }}" \
111106
-H "Accept: application/vnd.github.v3+json" \
112-
https://api.github.com/repos/All-Hands-AI/install-openhands-website/pulls \
107+
https://api.github.com/repos/OpenHands/install-openhands-website/pulls \
113108
-d '{
114109
"title": "Update OpenHands CLI version to ${{ steps.extract_version.outputs.version }}",
115110
"head": "'"$BRANCH_NAME"'",

0 commit comments

Comments
 (0)