2023-05-25&26 #134
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: update. | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup timezone | |
uses: zcong1993/setup-timezone@master | |
with: | |
timezone: Asia/Shanghai | |
- uses: actions/checkout@master | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: '1.18' # The Go version to download (if necessary) and use. | |
- run: go run main.go | |
- name: Commit files | |
run: | | |
git add README.md | |
git config --local user.email "i@nn.ci" | |
git config --local user.name "Xhofe" | |
git commit --allow-empty -m "Update readme for ${{ github.event.commits[0].message }}" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |