Fix: add project name in ci instead of Makefile
All checks were successful
All checks were successful
This commit is contained in:
@@ -33,6 +33,8 @@ jobs:
|
|||||||
- run-go-vet
|
- run-go-vet
|
||||||
- check-swagger-up-to-date
|
- check-swagger-up-to-date
|
||||||
runs-on: imgbuilder
|
runs-on: imgbuilder
|
||||||
|
env:
|
||||||
|
COMPOSE_ARGS: '-p go2025-backend'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
5
Makefile
5
Makefile
@@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
SWAG ?= go run github.com/swaggo/swag/cmd/swag@v1.16.4
|
SWAG ?= go run github.com/swaggo/swag/cmd/swag@v1.16.4
|
||||||
DOCKER ?= docker
|
DOCKER ?= docker
|
||||||
COMPOSE ?= $(DOCKER) compose -p go2025-backend --progress plain
|
COMPOSE_ARGS += --progress plain
|
||||||
|
COMPOSE ?= $(DOCKER) compose $(COMPOSE_ARGS)
|
||||||
|
|
||||||
GO_ENV += CGO_ENABLED=0
|
GO_ENV += CGO_ENABLED=0
|
||||||
SOURCE := $(shell find . -type f -name '*.go')
|
SOURCE := $(shell find . -type f -name '*.go')
|
||||||
@@ -16,7 +17,7 @@ swagger:
|
|||||||
$(SWAG) init -o docs -g cmds/serve.go -pdl 1
|
$(SWAG) init -o docs -g cmds/serve.go -pdl 1
|
||||||
|
|
||||||
docker: $(TARGET)
|
docker: $(TARGET)
|
||||||
$(DOCKER) compose up -d --force-recreate --build backend
|
$(COMPOSE) up -d --force-recreate --build backend
|
||||||
|
|
||||||
$(TARGET): $(SOURCE)
|
$(TARGET): $(SOURCE)
|
||||||
$(GO_ENV) go build -o $@
|
$(GO_ENV) go build -o $@
|
||||||
|
|||||||
Reference in New Issue
Block a user