Cron Task #144353
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: Cron Task | |
on: | |
push: | |
schedule: | |
- cron: '*/10 * * * *' | |
jobs: | |
build: | |
name: Update Profile | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.16 | |
uses: actions/setup-go@v1 | |
with: | |
go-version: 1.16 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v1 | |
- name: Get dependencies | |
run: | | |
go mod tidy | |
- name: Build & Run | |
run: | | |
go build . && ./wuhan005 && rm wuhan005 | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v3 | |
with: | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
git-user-signingkey: true | |
git-commit-gpgsign: true | |
- name: Git Commit | |
run: | | |
git config --local user.email "bot@github.red" | |
git config --local user.name "Eggplant Bot" | |
git add README.md | |
git commit -S -m "Update README.md" || true | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: master |