This is an automated email from the ASF dual-hosted git repository.

zclllyybb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 4cf3311f0ca [fix] Update OpenCode review workflow to persist configure 
authentication (#3732)
4cf3311f0ca is described below

commit 4cf3311f0ca1673f43d2bffada6344580ff67cc6
Author: zclllyybb <[email protected]>
AuthorDate: Fri May 22 18:59:06 2026 +0800

    [fix] Update OpenCode review workflow to persist configure authentication 
(#3732)
---
 .github/workflows/opencode-review.yml | 48 +++++++++++++++++++++++++----------
 1 file changed, 35 insertions(+), 13 deletions(-)

diff --git a/.github/workflows/opencode-review.yml 
b/.github/workflows/opencode-review.yml
index fde1bfbf98c..7d14c652801 100644
--- a/.github/workflows/opencode-review.yml
+++ b/.github/workflows/opencode-review.yml
@@ -56,21 +56,26 @@ jobs:
           echo "All install attempts failed"
           exit 1
 
+      - name: Install ossutil
+        run: |
+          tmp_dir="$(mktemp -d)"
+          trap 'rm -rf "$tmp_dir"' EXIT
+          curl -fsSL -o "$tmp_dir/ossutil.zip" 
https://gosspublic.alicdn.com/ossutil/1.7.19/ossutil-v1.7.19-linux-amd64.zip
+          unzip -q "$tmp_dir/ossutil.zip" -d "$tmp_dir"
+          sudo install -m 0755 "$tmp_dir/ossutil-v1.7.19-linux-amd64/ossutil" 
/usr/local/bin/ossutil
+
       - name: Configure OpenCode auth
+        id: configure-auth
+        env:
+          OSS_AK: ${{ secrets.OSS_AK }}
+          OSS_SK: ${{ secrets.OSS_SK }}
+          OSS_ENDPOINT: oss-cn-hongkong.aliyuncs.com
+          OSS_AUTH_OBJECT: oss://doris-community-ci/auth.json
         run: |
           mkdir -p ~/.local/share/opencode
-          cat > ~/.local/share/opencode/auth.json <<EOF
-          {
-            "github-copilot": {
-              "type": "oauth",
-              "refresh": "${CODE_REVIEW_ZCLLL_COPILOT_OPENCODE_KEY}",
-              "access": "${CODE_REVIEW_ZCLLL_COPILOT_OPENCODE_KEY}",
-              "expires": 0
-            }
-          }
-          EOF
-        env:
-          CODE_REVIEW_ZCLLL_COPILOT_OPENCODE_KEY: ${{ 
secrets.CODE_REVIEW_ZCLLL_COPILOT_OPENCODE_KEY }}
+          ossutil -i "$OSS_AK" -k "$OSS_SK" -e "$OSS_ENDPOINT" cp -f 
"$OSS_AUTH_OBJECT" ~/.local/share/opencode/auth.json
+          chmod 600 ~/.local/share/opencode/auth.json
+          test -s ~/.local/share/opencode/auth.json
 
       - name: Configure OpenCode permission
         run: |
@@ -113,4 +118,21 @@ jobs:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           PROMPT=$(cat /tmp/review_prompt.txt)
-          opencode run "$PROMPT" -m "github-copilot/claude-sonnet-4.6"
+          opencode run "$PROMPT" -m "openai/gpt-5.5"
+
+      - name: Persist OpenCode auth
+        if: ${{ always() && steps.configure-auth.outcome == 'success' }}
+        env:
+          OSS_AK: ${{ secrets.OSS_AK }}
+          OSS_SK: ${{ secrets.OSS_SK }}
+          OSS_ENDPOINT: oss-cn-hongkong.aliyuncs.com
+          OSS_AUTH_OBJECT: oss://doris-community-ci/auth.json
+        run: |
+          if [ ! -s ~/.local/share/opencode/auth.json ]; then
+            echo "::warning::OpenCode auth file is missing or empty; skip OSS 
auth persistence."
+            exit 0
+          fi
+
+          if ! ossutil -i "$OSS_AK" -k "$OSS_SK" -e "$OSS_ENDPOINT" cp -f 
~/.local/share/opencode/auth.json "$OSS_AUTH_OBJECT"; then
+            echo "::warning::Failed to persist OpenCode auth to OSS; continue 
because review already finished."
+          fi


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to