|
| 1 | +--- |
1 | 2 | name: Update A2A Schema from Specification |
2 | | - |
3 | 3 | on: |
4 | 4 | repository_dispatch: |
5 | 5 | types: [a2a_json_update] |
6 | 6 | workflow_dispatch: |
7 | | - |
8 | 7 | jobs: |
9 | 8 | generate_and_pr: |
10 | 9 | runs-on: ubuntu-latest |
11 | 10 | permissions: |
12 | 11 | contents: write |
13 | 12 | pull-requests: write |
14 | | - |
15 | 13 | steps: |
16 | 14 | - name: Checkout code |
17 | 15 | uses: actions/checkout@v4 |
18 | | - |
19 | 16 | - name: Set up Python |
20 | 17 | uses: actions/setup-python@v5 |
21 | 18 | with: |
22 | | - python-version: "3.10" |
23 | | - |
| 19 | + python-version: '3.10' |
24 | 20 | - name: Install uv |
25 | 21 | uses: astral-sh/setup-uv@v6 |
26 | | - |
27 | 22 | - name: Configure uv shell |
28 | 23 | run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH |
29 | | - |
30 | 24 | - name: Install dependencies (datamodel-code-generator) |
31 | 25 | run: uv sync |
32 | | - |
33 | 26 | - name: Define output file variable |
34 | 27 | id: vars |
35 | 28 | run: | |
36 | 29 | GENERATED_FILE="./src/a2a/types.py" |
37 | 30 | echo "GENERATED_FILE=$GENERATED_FILE" >> "$GITHUB_OUTPUT" |
38 | | -
|
39 | 31 | - name: Generate types from schema |
40 | 32 | run: | |
41 | 33 | chmod +x scripts/generate_types.sh |
42 | 34 | ./scripts/generate_types.sh "${{ steps.vars.outputs.GENERATED_FILE }}" |
43 | | -
|
44 | 35 | - name: Install Buf |
45 | 36 | uses: bufbuild/buf-setup-action@v1 |
46 | | - |
47 | 37 | - name: Run buf generate |
48 | 38 | run: | |
49 | | - set -euo pipefail # Exit immediately if a command exits with a non-zero status |
50 | | -
|
| 39 | + set -euo pipefail # Exit immediately if a command exits with a non-zero status |
51 | 40 | echo "Running buf generate..." |
52 | 41 | buf generate |
53 | 42 | uv run scripts/grpc_gen_post_processor.py |
54 | 43 | echo "Buf generate finished." |
55 | | -
|
56 | 44 | - name: Create Pull Request with Updates |
57 | 45 | uses: peter-evans/create-pull-request@v6 |
58 | 46 | with: |
59 | 47 | token: ${{ secrets.A2A_BOT_PAT }} |
60 | | - committer: "a2a-bot <[email protected]>" |
61 | | - author: "a2a-bot <[email protected]>" |
62 | | - commit-message: "feat: Update A2A types from specification 🤖" |
63 | | - title: "feat: Update A2A types from specification 🤖" |
| 48 | + committer: a2a-bot <[email protected]> |
| 49 | + author: a2a-bot <[email protected]> |
| 50 | + commit-message: 'feat: Update A2A types from specification 🤖' |
| 51 | + title: 'feat: Update A2A types from specification 🤖' |
64 | 52 | body: | |
65 | | - This PR updates `src/a2a/types.py` based on the latest `specification/json/a2a.json` from [google-a2a/A2A](https://github.com/google-a2a/A2A/commit/${{ github.event.client_payload.sha }}). |
66 | | - branch: "auto-update-a2a-types-${{ github.event.client_payload.sha }}" |
| 53 | + This PR updates `src/a2a/types.py` based on the latest `specification/json/a2a.json` from [a2aproject/A2A](https://github.com/a2aproject/A2A/commit/${{ github.event.client_payload.sha }}). |
| 54 | + branch: auto-update-a2a-types-${{ github.event.client_payload.sha }} |
67 | 55 | base: main |
68 | 56 | labels: | |
69 | 57 | automated |
70 | 58 | dependencies |
71 | | - add-paths: | |
| 59 | + add-paths: |- |
72 | 60 | ${{ steps.vars.outputs.GENERATED_FILE }} |
73 | 61 | src/a2a/grpc/ |
0 commit comments