mirror of
https://github.com/gogs/gogs.git
synced 2026-05-06 06:45:40 +02:00
chore: run task generate (#6844)
This commit is contained in:
16
.github/workflows/go.yml
vendored
16
.github/workflows/go.yml
vendored
@@ -30,13 +30,23 @@ jobs:
|
||||
with:
|
||||
version: latest
|
||||
args: --timeout=30m
|
||||
- name: Check Go module tidiness
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
- name: Install go-bindata
|
||||
shell: bash
|
||||
run: |
|
||||
curl --silent --location --output /usr/local/bin/go-bindata https://github.com/kevinburke/go-bindata/releases/download/v3.23.0/go-bindata-linux-amd64
|
||||
chmod +x /usr/local/bin/go-bindata
|
||||
- name: Check Go module tidiness and generated files
|
||||
shell: bash
|
||||
run: |
|
||||
go mod tidy
|
||||
STATUS=$(git status --porcelain go.mod go.sum)
|
||||
task generate
|
||||
STATUS=$(git status --porcelain)
|
||||
if [ ! -z "$STATUS" ]; then
|
||||
echo "Running go mod tidy modified go.mod and/or go.sum"
|
||||
echo "Unstaged files:"
|
||||
echo $STATUS
|
||||
echo "Run 'go mod tidy' or 'task generate' and commit them"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user