Skip to content

Commit

Permalink
CICD: Ensure that the changes from go generate are included in the …
Browse files Browse the repository at this point in the history
…original pull requests.
  • Loading branch information
cafferata committed Jan 26, 2024
1 parent f010c1b commit 2c2677e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/pr_check_git_status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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
```

0 comments on commit 2c2677e

Please sign in to comment.