-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.1 KB
/
reforestation.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: Reforestation
on:
push:
branches:
- master
schedule:
- cron: '0 0,12 * * *'
jobs:
reforestation:
runs-on: ubuntu-latest
steps:
- name: Set global directory
run: git config --global --add safe.directory /github/workspace
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 1
- name: Modify last update
run: |
d=`date '+%Y-%m-%dT%H:%M:%SZ'`
echo $d > LAST_UPDATED
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "hendraaagil"
git add -A
arr[0]="feat: 🎉 reforestation"
arr[1]="feat: 🌳 reforestation"
arr[2]="feat: ✅ reforestation"
arr[3]="feat: 🌲 reforestation"
rand=$[$RANDOM % ${#arr[@]}]
git commit -m "${arr[$rand]}"
- name: GitHub Push
uses: ad-m/[email protected]
with:
force: true
directory: '.'
github_token: ${{ secrets.GITHUB_TOKEN }}