-
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (31 loc) · 1.01 KB
/
webhook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: hook
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # UTC時刻で日本時間の0:00
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Check submodule update
id: check
run: |
git submodule update --remote
git diff --quiet || echo "isChanged=true" >> $GITHUB_ENV
- name: Commit and push if changes
if: ${{ env.isChanged == 'true' }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git commit -am "🤖: Update submodules"
git push
# コミットすることでVercelのCIが実行されるためwebhookが不要
# - name: Webhook
# if: ${{ env.isChanged == 'true' }}
# uses: joelwmale/webhook-action@master
# with:
# url: ${{ secrets.VERCEL_WEBHOOK }}