File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Run Speakeasy on PR
2+
3+ permissions :
4+ contents : write
5+ pull-requests : write
6+
7+ on :
8+ workflow_dispatch :
9+ pull_request :
10+ paths :
11+ - .speakeasy/in.openapi.yaml
12+
13+ jobs :
14+ run-speakeasy :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+ with :
20+ ref : ${{ github.event.pull_request.head.ref }}
21+ token : ${{ secrets.GITHUB_TOKEN }}
22+
23+ - name : Setup Speakeasy
24+ uses : speakeasy-api/sdk-generation-action@v15
25+ with :
26+ speakeasy_version : latest
27+
28+ - name : Run Speakeasy
29+ run : speakeasy run
30+
31+ - name : Commit changes
32+ run : |
33+ git config --global user.name 'github-actions[bot]'
34+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
35+ git add .
36+ if git diff --staged --quiet; then
37+ echo "No changes to commit"
38+ else
39+ git commit -m "chore: run speakeasy and update generated files"
40+ git push
41+ fi
42+ env :
43+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments