From 9cc376258026b0ed89aa44f21892d68cc6c0f369 Mon Sep 17 00:00:00 2001 From: Ray Myers Date: Wed, 5 Nov 2025 15:55:49 -0600 Subject: [PATCH] Add comment explaining enterprise preview process, and swap token --- .github/workflows/enterprise-preview.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/enterprise-preview.yml b/.github/workflows/enterprise-preview.yml index e31222827b..d65291f7e0 100644 --- a/.github/workflows/enterprise-preview.yml +++ b/.github/workflows/enterprise-preview.yml @@ -19,11 +19,31 @@ jobs: if: github.event.label.name == 'deploy' runs-on: blacksmith-4vcpu-ubuntu-2204 steps: + - name: Find Comment + uses: peter-evans/find-comment@v3 + id: find-comment + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: | + ⚠️ Enterprise preview + + - name: Comment warning on PR + uses: peter-evans/create-or-update-comment@v4 + with: + issue-number: ${{ github.event.pull_request.number }} + comment-id: ${{ steps.find-comment.outputs.comment-id }} + edit-mode: replace + body: | + ⚠️ Enterprise preview: you can check the build for progress and errors here: + + https://github.com/OpenHands/deploy/actions/workflows/deploy.yaml + # This should match the version in ghcr-build.yml - name: Trigger remote job run: | curl --fail-with-body -sS -X POST \ - -H "Authorization: Bearer ${{ secrets.PAT_TOKEN }}" \ + -H "Authorization: Bearer ${{ secrets.OPENHANDS_AGENT_PAT }}" \ -H "Accept: application/vnd.github+json" \ -d "{\"ref\": \"main\", \"inputs\": {\"openhandsPrNumber\": \"${{ github.event.pull_request.number }}\", \"deployEnvironment\": \"feature\", \"enterpriseImageTag\": \"pr-${{ github.event.pull_request.number }}\" }}" \ https://api.github.com/repos/OpenHands/deploy/actions/workflows/deploy.yaml/dispatches