-
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (44 loc) · 1.26 KB
/
update.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
41
42
43
44
45
46
47
name: update
on:
schedule:
# NOTE: at 7:50 am every day, JST
- cron: '50 22 * * *'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-data:
name: update data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- run: npm ci
- run: npm update japanese-public-holidays
- run: npm run build
- run: npm run lint
- run: npm test
- run: |
if git diff --exit-code --quiet
then
echo 'changed=false' >> "$GITHUB_OUTPUT"
else
echo 'changed=true' >> "$GITHUB_OUTPUT"
fi
id: diff
- run: npm version patch --no-git-tag-version
if: steps.diff.outputs.changed == 'true'
- uses: peter-evans/create-pull-request@v7
with:
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
body: ''
branch: feature/update-japanese-public-holidays
commit-message: update japanese-public-holidays
delete-branch: true
reviewers: sasaplus1
title: update japanese-public-holidays
if: steps.diff.outputs.changed