-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) 路 1.23 KB
/
plant-tree.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
48
49
50
51
52
53
54
name: Plant trees on your GitHub profile to make it look greener
on:
push:
branches:
- main
schedule:
- cron: "0 10 * * *"
jobs:
auto_commit:
runs-on: ubuntu-latest
steps:
- name: DEBUG
run: echo "::debug::Ref = ${{github.ref}}"
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Update last planted
run: |
d=`date '+%Y-%m-%dT%H:%M:%SZ'`
echo $d > LAST_PLANTED
- name: Commit changes
run: |
git config --local user.email "imam@fahru.my.id"
git config --local user.name "masfahru"
git add -A
arr[0]="馃尡"
arr[1]="馃尦"
arr[2]="馃尨"
arr[3]="馃尣"
arr[4]="馃尩"
arr[5]="馃尶"
arr[6]="馃崁"
arr[7]="馃尵"
arr[8]="馃"
arr[9]="馃尰"
rand=$[$RANDOM % ${#arr[@]}]
git commit -m "${arr[$rand]}"
- name: GitHub Push
uses: ad-m/github-push-action@v0.6.0
with:
branch: ${{ github.ref }}
directory: "."
github_token: ${{ secrets.GITHUB_TOKEN }}