This repository has been archived by the owner on May 27, 2024. It is now read-only.
给一些结构体实现Stringer接口 #19
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: GoFmt | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: gofmt | |
if: github.repository_owner == 'CuteReimu' | |
continue-on-error: true | |
run: | | |
if [ "$(gofmt -s -l -w . | wc -l)" -gt 0 ]; then | |
git config --local user.name 'github-actions[bot]' | |
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git add --all | |
git commit -m "gofmt" | |
git push | |
fi |