Skip to content

Commit b9646f4

Browse files
wyf7107copybara-github
authored andcommitted
fix: fix ADK Web update workflow PR ownership and CLA issue
Update the "Release: Update ADK Web" workflow to use the `RELEASE_PAT` secret instead of `GITHUB_TOKEN` so the PR is opened by the release bot. Dynamically extract the bot's identity to configure the commit author and committer, ensuring the commits pass the Google CLA check. Co-authored-by: Yifan Wang <wanyif@google.com> PiperOrigin-RevId: 933980559
1 parent e5c7d20 commit b9646f4

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/release-update-adk-web.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,25 @@ jobs:
5151
rm frontend.zip
5252
echo "Assets extracted successfully."
5353
54+
- name: Extract Bot Identity
55+
id: bot-identity
56+
env:
57+
GH_TOKEN: ${{ secrets.RELEASE_PAT }}
58+
run: |
59+
USER_JSON=$(gh api user)
60+
echo "name=$(echo "$USER_JSON" | jq -r '.login')" >> $GITHUB_OUTPUT
61+
echo "email=$(echo "$USER_JSON" | jq -r '.id')+$(echo "$USER_JSON" | jq -r '.login')@users.noreply.github.com" >> $GITHUB_OUTPUT
62+
5463
- name: Create Pull Request
5564
uses: peter-evans/create-pull-request@v6
5665
with:
57-
token: ${{ secrets.GITHUB_TOKEN }}
66+
token: ${{ secrets.RELEASE_PAT }}
5867
commit-message: "Update compiled adk web files from ${{ github.event.inputs.adk_web_repo }}@${{ github.event.inputs.adk_web_tag || 'latest' }}"
5968
branch: update-frontend-assets
6069
delete-branch: true
6170
title: "chore: update compiled adk web assets"
71+
committer: "${{ steps.bot-identity.outputs.name }} <${{ steps.bot-identity.outputs.email }}>"
72+
author: "${{ steps.bot-identity.outputs.name }} <${{ steps.bot-identity.outputs.email }}>"
6273
body: |
6374
This PR automatically updates the compiled adk web files in `src/google/adk/cli/browser/` using the assets from `${{ github.event.inputs.adk_web_repo }}@${{ github.event.inputs.adk_web_tag || 'latest' }}`.
6475
Please review the diff before merging.

0 commit comments

Comments
 (0)