feat: add agent-guided UX (#168) #2
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
| name: Notify gateway of template asset updates | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'examples/**' | |
| - '.github/workflows/notify-gateway-template-assets-update.yml' | |
| workflow_dispatch: | |
| inputs: | |
| statespace_sha: | |
| description: Optional statespace commit SHA to publish from (defaults to current commit) | |
| required: false | |
| type: string | |
| permissions: {} | |
| jobs: | |
| dispatch-gateway: | |
| name: Dispatch template update to gateway | |
| runs-on: blacksmith-4vcpu-ubuntu-2204 | |
| steps: | |
| - name: Resolve statespace commit SHA | |
| id: sha | |
| run: | | |
| set -euo pipefail | |
| target_sha="${{ github.event.inputs.statespace_sha }}" | |
| if [[ -z "${target_sha}" ]]; then | |
| target_sha="${{ github.sha }}" | |
| fi | |
| if [[ ! "$target_sha" =~ ^[0-9a-f]{40}$ ]]; then | |
| echo "::error::statespace_sha must be a full 40-character commit SHA" | |
| exit 1 | |
| fi | |
| echo "value=$target_sha" >> "$GITHUB_OUTPUT" | |
| - name: Send repository_dispatch event to gateway | |
| uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 | |
| with: | |
| token: ${{ secrets.GATEWAY_REPO_DISPATCH_TOKEN }} | |
| repository: statespace-tech/gateway | |
| event-type: statespace-template-assets-updated | |
| client-payload: >- | |
| {"statespace_sha":"${{ steps.sha.outputs.value }}","statespace_ref":"${{ github.ref_name }}","source_run_id":"${{ github.run_id }}"} |