File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Update documents repository
2+
3+ on :
4+ push :
5+ branches :
6+ - actions
7+ - master
8+ workflow_dispatch :
9+
10+ jobs :
11+ update_documents :
12+ runs-on : ubuntu-latest
13+ concurrency :
14+ group : ${{ github.workflow }}
15+ cancel-in-progress : true
16+ env :
17+ # for debug
18+ OWNER : ${{ github.repository_owner }}
19+ REPOSITORY : ${{ github.repository }}
20+ PACKAGES_REPO : ${{ vars.PACKAGES_REPO }}
21+ PACKAGES_WORKFLOW : ${{ vars.PACKAGES_WORKFLOW }}
22+ PACKAGES_TARGET : ' wanderlust wanderlust-utils'
23+ steps :
24+ - name : Get app-token
25+ uses : actions/create-github-app-token@v1
26+ id : app-token
27+ with :
28+ app-id : ${{ secrets.WLDOCS_APP_ID }}
29+ private-key : ${{ secrets.WLDOCS_PRIVATE_KEY }}
30+ owner : ${{ github.repository_owner }}
31+ repositories : ${{ vars.PACKAGES_REPO }}
32+ - name : Dispatch workflow to update document repository
33+ uses : actions/github-script@v7
34+ with :
35+ github-token : ${{ steps.app-token.outputs.token }}
36+ script : |
37+ await github.rest.actions.createWorkflowDispatch({
38+ owner: '${{ github.repository_owner }}',
39+ repo: '${{ vars.PACKAGES_REPO }}',
40+ workflow_id: '${{ vars.PACKAGES_WORKFLOW }}',
41+ inputs: {
42+ targets: '${{ env.PACKAGES_TARGET }}'
43+ },
44+ ref: 'wanderlust'})
You can’t perform that action at this time.
0 commit comments