Skip to content

Commit 834ed07

Browse files
wip
1 parent 494945f commit 834ed07

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/update-lib.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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/"

0 commit comments

Comments
 (0)