Skip to content

Commit 9eda056

Browse files
authored
ci: Change update-a2a-types to use repository_dispatch (#92)
Followup to a2aproject/A2A#634
1 parent e0db20f commit 9eda056

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

.github/workflows/update-a2a-types.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Update A2A Schema from Specification
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * *" # Runs daily at 00:00 UTC
4+
repository_dispatch:
5+
types: [a2a_json_update]
66
workflow_dispatch:
77

88
jobs:
9-
check_and_update:
9+
generate_and_pr:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: write
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v5
2121
with:
22-
python-version: "3.13"
22+
python-version: "3.10"
2323

2424
- name: Install uv
2525
run: curl -LsSf https://astral.sh/uv/install.sh | sh
@@ -61,20 +61,17 @@ jobs:
6161
--use-standard-collections
6262
echo "Codegen finished."
6363
64-
- name: Create Pull Request if generated file changed
64+
- name: Create Pull Request with Updates
6565
uses: peter-evans/create-pull-request@v6
6666
with:
6767
token: ${{ secrets.A2A_BOT_PAT }}
68-
committer: a2a-bot <[email protected]>
69-
author: a2a-bot <[email protected]>
70-
commit-message: "chore: 🤖 Auto-update A2A schema from specification"
71-
title: "chore: 🤖 Auto-update A2A Schema from Specification"
68+
committer: "a2a-bot <[email protected]>"
69+
author: "a2a-bot <[email protected]>"
70+
commit-message: "chore: 🤖Auto-update A2A types from google/A2A@${{ github.event.client_payload.sha }}"
71+
title: "chore: 🤖 Auto-update A2A types from google/A2A"
7272
body: |
73-
This PR automatically updates the A2A schema types based on the latest specification.
74-
75-
This update was triggered by the scheduled workflow run.
76-
See the workflow run details: [${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
77-
branch: "a2a-schema-update"
73+
This PR updates `src/a2a/types.py` based on the latest `specification/json/a2a.json` from [google/A2A](https://github.com/google/A2A/commit/${{ github.event.client_payload.sha }}).
74+
branch: "auto-update-a2a-types-${{ github.event.client_payload.sha }}"
7875
base: main
7976
labels: |
8077
automated

0 commit comments

Comments
 (0)