-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (35 loc) · 949 Bytes
/
update_readme.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
name: Update README.md
on:
schedule:
# execute every 5 mins
- cron: '*/5 * * * *'
jobs:
execute:
name: Generate modified README.md
runs-on: ubuntu-latest
steps:
- name: Checkout repo code
uses: actions/checkout@v2
- name: Installs NodeJS
uses: actions/setup-node@v2
with:
node-verson: '12'
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
token: '${{ secrets.GITHUB_TOKEN }}'
- name: Modifies readme file
env:
REPO: ${{ github.repository }}
run: |
npm i
npm run update_readme
- if: (success())
name: Commit changes
run: |
git commit -m "Auto updated readme file" -a
- if: (success())
name: Pushes commit with update to repo
uses: ad-m/github-push-action@master
with:
force: true
branch: ${{ github.ref }}