Skip to content

Commit 8dd1786

Browse files
committed
Use API to enable each workflow
Idea by @thinca.
1 parent 51874d2 commit 8dd1786

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/trigger.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Trigger new build
1+
name: Enable each workflow
22
on:
33
schedule:
44
- cron: '15 11 3 * *'
@@ -7,11 +7,13 @@ jobs:
77
deploy:
88
runs-on: ubuntu-latest
99
steps:
10-
- name: checkout master
11-
uses: actions/checkout@v2
12-
- name: Create an empty commit and push it
10+
- name: Enable each workflow
1311
run: |
14-
git config --local user.name 'github-actions'
15-
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
16-
git commit --allow-empty -m 'Trigger a new build'
17-
git push origin master
12+
curl -i -X PUT \
13+
-H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \
14+
-H "Accept: application/vnd.github.v3+json" \
15+
'https://api.github.com/repos/vim-jp/vimdoc-en/actions/workflows/generate.yml/enable'
16+
curl -i -X PUT \
17+
-H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \
18+
-H "Accept: application/vnd.github.v3+json" \
19+
'https://api.github.com/repos/vim-jp/vimdoc-en/actions/workflows/trigger.yml/enable'

0 commit comments

Comments
 (0)