Skip to content

Commit 7ea64a6

Browse files
committed
Add workflow to update package
* .github/workflows/update_pacakge.yml: New file.
1 parent 8344d7d commit 7ea64a6

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Update packages repository
2+
3+
on:
4+
push:
5+
branches:
6+
- semi-1_14-wl
7+
workflow_dispatch:
8+
9+
jobs:
10+
update_packages:
11+
runs-on: ubuntu-latest
12+
concurrency:
13+
group: ${{ github.workflow }}
14+
cancel-in-progress: true
15+
env:
16+
# for debug
17+
OWNER: ${{ github.repository_owner }}
18+
REPOSITORY: ${{ github.repository }}
19+
PACKAGES_REPO: ${{ vars.PACKAGES_REPO }}
20+
PACKAGES_WORKFLOW: ${{ vars.PACKAGES_WORKFLOW }}
21+
PACKAGES_TARGET: ${{ vars.PACKAGES_TARGET }}
22+
steps:
23+
- name: Get app-token
24+
uses: actions/create-github-app-token@v1
25+
id: app-token
26+
with:
27+
app-id: ${{ secrets.WLDOCS_APP_ID }}
28+
private-key: ${{ secrets.WLDOCS_PRIVATE_KEY }}
29+
owner: ${{ github.repository_owner }}
30+
repositories: ${{ vars.PACKAGES_REPO }}
31+
- name: Dispatch workflow to update document repository
32+
uses: actions/github-script@v7
33+
with:
34+
github-token: ${{ steps.app-token.outputs.token }}
35+
script: |
36+
await github.rest.actions.createWorkflowDispatch({
37+
owner: '${{ github.repository_owner }}',
38+
repo: '${{ vars.PACKAGES_REPO }}',
39+
workflow_id: '${{ vars.PACKAGES_WORKFLOW }}',
40+
inputs: {
41+
targets: '${{ vars.PACKAGES_TARGET }}'
42+
},
43+
ref: 'wanderlust'})

0 commit comments

Comments
 (0)