search in cluster a #388
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: Format | |
on: | |
pull_request: | |
jobs: | |
go-fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi | |
go-mod-tidy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- run: | | |
go mod tidy | |
STATUS=$(git status --porcelain go.mod go.sum) | |
if [ ! -z "$STATUS" ]; then | |
echo "Running go mod tidy modified go.mod and/or go.sum" >> $GITHUB_STEP_SUMMARY | |
exit 1 | |
fi | |
exit 0 | |
prettier: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- run: npx prettier --check "**/*.{js,jsx,ts,tsx,css,scss,md,json}" 2> $GITHUB_STEP_SUMMARY |