Skip to content

CICD: GitHub Action check git status #11

CICD: GitHub Action check git status

CICD: GitHub Action check git status #11

name: "PR: Check git status"
on:
push:
branches:
- 'tlim_testpr'
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-go@v5
with:
go-version: stable
- run: go install golang.org/x/tools/cmd/stringer@latest
- run: go fmt ./...
- run: go mod tidy
- run: go generate ./...
- run: echo "Demo time!" >> README.md
- uses: CatChen/check-git-status-action@v1
with:
fail-if-not-clean: true
request-changes-if-not-clean: true
request-changes-comment: |
Please make sure you've run the following commands from the root directory.
```shell
go vet ./...
go fmt ./...
go generate ./...
go mod tidy
```