Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Commit

Permalink
feat: docker image for master.
Browse files Browse the repository at this point in the history
  • Loading branch information
appleboy committed Dec 29, 2017
1 parent 56dc22a commit 0893e29
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ pipeline:
when:
event: [ push, tag ]

docker:
image: plugins/docker:17.05
pull: true
secrets: [ docker_username, docker_password ]
group: release
repo: gitea/lgtm
when:
event: [ push ]
branch: [ master ]

release:
image: plugins/s3:1
pull: true
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ EXECUTABLE := lgtm
IMPORT := github.com/go-gitea/lgtm

SHA := $(shell git rev-parse --short HEAD)
SOURCES ?= $(shell find . -name "*.go" -type f)

LDFLAGS += -X "github.com/go-gitea/lgtm/version.VersionDev=$(SHA)"

Expand Down Expand Up @@ -79,13 +80,13 @@ test-pgsql:
DATABASE_DRIVER="postgres" DATABASE_DATASOURCE="postgres://postgres@pgsql:5432/postgres?sslmode=disable" go test -v -cover $(IMPORT)/store/datastore

.PHONY: install
install: $(wildcard *.go)
install: $(SOURCES)
go install -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)'

.PHONY: build
build: $(BIN)/$(EXECUTABLE)

$(BIN)/$(EXECUTABLE): $(wildcard *.go)
$(BIN)/$(EXECUTABLE): $(SOURCES)
go build -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@

release: release-dirs release-build release-copy release-check
Expand Down

0 comments on commit 0893e29

Please sign in to comment.