Reforestation #2970
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |