Merge pull request #499 from rubambiza/fix/dev-md-discussions-link #43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Sign A2A agent card with sigstore-a2a using the official pattern from sigstore-a2a repo | |
| # Based on: https://github.com/sigstore/sigstore-a2a/blob/main/.github/workflows/ci.yml | |
| name: Sign and verify agent card (sigstore-a2a) | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| sign-agent-card: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9 # v6.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.13" | |
| - name: Install UV | |
| uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | |
| with: | |
| version: "latest" | |
| - name: Cache UV dependencies | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.cache/uv | |
| key: ${{ runner.os }}-uv-sigstore-a2a-293f9bd | |
| - name: Install sigstore-a2a with pinned dependencies | |
| run: | | |
| # Pin a2a-sdk to specific version | |
| uv pip install --system --prerelease=allow "a2a-sdk==0.2.16" | |
| # Pin sigstore-a2a to specific commit SHA for reproducibility and security | |
| # Commit 293f9bd from 2026-03-30: "ci(deps): Bump actions/deploy-pages from 4 to 5" | |
| # Update periodically by checking: https://github.com/sigstore/sigstore-a2a/commits/main | |
| uv pip install --system --prerelease=allow "git+https://github.com/sigstore/sigstore-a2a.git@293f9bd" | |
| - name: Get GitHub OIDC token | |
| run: | | |
| OIDC_TOKEN=$(curl -sf -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ | |
| "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=sigstore" | jq -r '.value') | |
| echo "$OIDC_TOKEN" > oidc-token.txt | |
| - name: Sign agent card | |
| run: | | |
| sigstore-a2a sign \ | |
| --output signed-agent-card.json \ | |
| --repository "${{ github.repository }}" \ | |
| --commit_sha "${{ github.sha }}" \ | |
| --provenance \ | |
| --identity_token "$(cat oidc-token.txt)" \ | |
| operator/examples/ci-agent-card.json | |
| - name: Verify signature | |
| run: | | |
| sigstore-a2a verify \ | |
| --identity_provider "https://token.actions.githubusercontent.com" \ | |
| --identity "https://github.com/${{ github.repository }}/.github/workflows/sign-agent-card.yml@${{ github.ref }}" \ | |
| --repository "${{ github.repository }}" \ | |
| --workflow "${{ github.workflow }}" \ | |
| signed-agent-card.json | |
| - name: Upload signed agent card | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: signed-agent-card | |
| path: signed-agent-card.json | |
| retention-days: 14 |