-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (39 loc) · 1.18 KB
/
fetch-holidays.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
37
38
39
40
name: Fetch holidays
on:
workflow_dispatch:
schedule:
- cron: "5 11 * * *"
jobs:
fetch-holidays:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- uses: actions/setup-node@v4
with:
node-version: "20"
check-latest: true
cache: npm
- run: npm ci
- run: npm run fetch-holidays
env:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
- uses: yykamei/actions-git-push@main
with:
commit-message: Update Holidays
branch: update-holidays
- uses: yykamei/actions-gh-pr-create@main
with:
token: ${{ steps.app-token.outputs.token }}
branch: update-holidays
title: Update Holidays
label: enhancement
body: |
*This pull request was automatically created to make src/holidays.json the latest*.
Check the files changes and merge if the changes make sense.