File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Update lib/"
2+
3+ on :
4+ workflow_dispatch :
5+ # Example of how to trigger this:
6+ # curl -X POST \
7+ # -H "Authorization: Bearer <token>" \
8+ # https://api.github.com/repos/github/codeql-action/actions/workflows/update-lib.yml/dispatches \
9+ # -d '{"ref":"main","inputs":{"pr":"<pr-number>"}}'
10+ # Replace <token> with a personal access token from this page: https://github.com/settings/tokens
11+ # Replace <pr-number> by the number of the pull request to update
12+ inputs :
13+ pr :
14+ description : ' The number of the PR to update'
15+ required : true
16+
17+ jobs :
18+ update-lib :
19+ runs-on : ubuntu-latest
20+
21+ steps :
22+ - name : Checkout repository
23+ uses : actions/checkout@v2
24+ - name : Checkout PR
25+ uses : dawidd6/action-checkout-pr@v1
26+ with :
27+ pr : ${{ github.event.inputs.pr }}
28+ - name : Merge main branch
29+ run : git merge main --no-ff
30+ - name : Remove lib/ directory
31+ run : rm -rf lib
32+ - name : Update lib/ directory
33+ run : npm run-script build
34+ - name : Push updates
35+ uses : stefanzweifel/git-auto-commit-action@v4
36+ with :
37+ commit_message : " Auto-update lib/"
You can’t perform that action at this time.
0 commit comments