-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (31 loc) · 989 Bytes
/
bumpHugo.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
name: Bump Hugo
on:
# push:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
setup:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@master
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: bump hugo
run: |
node ./tools/bump-hugo.js
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
if [ -n "$(git status --porcelain)" ]; then
git commit -am "Update hugo version"
else
echo "no changes";
fi
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}