This commit is contained in:
parent
a134755fab
commit
e44e13756b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
report.xml
|
||||
coverage.out
|
||||
*.xlsx
|
||||
dist/
|
||||
|
24
.woodpecker.yml
Normal file
24
.woodpecker.yml
Normal file
@ -0,0 +1,24 @@
|
||||
pipeline:
|
||||
earthly:
|
||||
image: earthly/earthly:v0.6.30
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- FORCE_COLOR=1
|
||||
- EARTHLY_EXEC_CMD="/bin/sh"
|
||||
commands:
|
||||
- earthly bootstrap
|
||||
- earthly --ci +ci
|
||||
when:
|
||||
event: tag
|
||||
earthly-release:
|
||||
image: earthly/earthly:v0.6.30
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- FORCE_COLOR=1
|
||||
- EARTHLY_EXEC_CMD="/bin/sh"
|
||||
secrets: [GITEA_TOKEN]
|
||||
commands:
|
||||
- earthly bootstrap
|
||||
- earthly --ci --secret GITEA_TOKEN=$GITEA_TOKEN +ci +release
|
13
Earthfile
13
Earthfile
@ -15,7 +15,7 @@ SAVE_CODE:
|
||||
ci:
|
||||
BUILD +lint
|
||||
BUILD +test
|
||||
# BUILD +release-dev
|
||||
BUILD +build
|
||||
|
||||
code:
|
||||
COPY go.mod go.sum ./
|
||||
@ -38,7 +38,6 @@ install-deps:
|
||||
SAVE ARTIFACT /go/bin gobin
|
||||
SAVE ARTIFACT /lib lib
|
||||
SAVE ARTIFACT /usr usr
|
||||
SAVE IMAGE --push git.wobcom.de:5050/smartmetering/mbuslight:cache-deps
|
||||
|
||||
deps:
|
||||
COPY +install-deps/gobin /go/bin
|
||||
@ -79,3 +78,13 @@ tidy:
|
||||
SAVE ARTIFACT go.mod AS LOCAL go.mod
|
||||
SAVE ARTIFACT go.sum AS LOCAL go.sum
|
||||
SAVE ARTIFACT vendor AS LOCAL vendor
|
||||
|
||||
build:
|
||||
FROM +deps
|
||||
COPY . .
|
||||
RUN goreleaser build --snapshot --clean
|
||||
|
||||
release:
|
||||
FROM +deps
|
||||
COPY . .
|
||||
RUN --secret GITEA_TOKEN goreleaser release
|
||||
|
Loading…
Reference in New Issue
Block a user