-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (43 loc) · 1.38 KB
/
nodejs.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
---
name: CI
'on':
push:
branches:
- master
schedule:
# https://crontab.guru/every-day
- cron: '0 0 * * *'
jobs:
sync-eips:
runs-on: ubuntu-latest
# don't trigger on bot updates
if: "!contains(github.event.head_commit.message, '[grue-bot]')"
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Scrape EIPs
run: |
chmod +x "${GITHUB_WORKSPACE}/scrape-eips.sh"
"${GITHUB_WORKSPACE}/scrape-eips.sh"
- name: Check for changes
run: |
if git diff --exit-code -- .cache/eip-index; then
echo "changes_exist=false" >> $GITHUB_ENV
else
echo "changes_exist=true" >> $GITHUB_ENV
fi
- name: Commit files
if: ${{ env.changes_exist == 'true' }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "grue-bot"
git add .
git commit -am "[grue-bot] Generate .cache/eip-index"
- name: Push changes
if: ${{ env.changes_exist == 'true' }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.FZF_TOKEN}}
branch: ${{ github.ref }}