绿我 #42
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: green me! | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
green: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Commit a year | |
run: | | |
username=${{ github.event.sender.login }} | |
git config user.email ${username}@users.noreply.github.com | |
git config user.name ${username} | |
for i in $(seq 365 -1 1); do | |
for j in $( seq $(( $RANDOM % 3 + 1 )) ); do | |
git commit --allow-empty -m "green!" --date="$i day ago" | |
done | |
done | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |