File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 workflow_dispatch :
1010
1111permissions :
12- contents : read
12+ contents : write
1313
1414jobs :
1515 capture :
1616 runs-on : ubuntu-latest
1717 timeout-minutes : 15
1818 steps :
19- - name : Checkout
19+ - name : Checkout source branch
2020 uses : actions/checkout@v4
21+ with :
22+ ref : ${{ github.head_ref || github.ref_name }}
2123
2224 - name : Setup Python
2325 uses : actions/setup-python@v5
8486 if-no-files-found : error
8587 retention-days : 14
8688
89+ - name : Commit verified assets to source branch
90+ if : >-
91+ github.event_name == 'pull_request' &&
92+ github.event.pull_request.head.repo.full_name == github.repository &&
93+ github.actor != 'github-actions[bot]'
94+ run : |
95+ git config user.name "github-actions[bot]"
96+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
97+ git add assets/demo/safe-agent-playground.png assets/demo/safe-agent-demo.gif
98+ if git diff --cached --quiet; then
99+ echo "Verified assets are unchanged."
100+ exit 0
101+ fi
102+ git commit -m "docs: refresh verified demo assets"
103+ git push origin "HEAD:${GITHUB_HEAD_REF}"
104+
87105 - name : Show API logs on failure
88106 if : failure()
89107 run : cat /tmp/safe-agent-api.log || true
You can’t perform that action at this time.
0 commit comments