This commit is contained in:
parent
a134755fab
commit
e44e13756b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
report.xml
|
report.xml
|
||||||
coverage.out
|
coverage.out
|
||||||
*.xlsx
|
*.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:
|
ci:
|
||||||
BUILD +lint
|
BUILD +lint
|
||||||
BUILD +test
|
BUILD +test
|
||||||
# BUILD +release-dev
|
BUILD +build
|
||||||
|
|
||||||
code:
|
code:
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
@ -38,7 +38,6 @@ install-deps:
|
|||||||
SAVE ARTIFACT /go/bin gobin
|
SAVE ARTIFACT /go/bin gobin
|
||||||
SAVE ARTIFACT /lib lib
|
SAVE ARTIFACT /lib lib
|
||||||
SAVE ARTIFACT /usr usr
|
SAVE ARTIFACT /usr usr
|
||||||
SAVE IMAGE --push git.wobcom.de:5050/smartmetering/mbuslight:cache-deps
|
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
COPY +install-deps/gobin /go/bin
|
COPY +install-deps/gobin /go/bin
|
||||||
@ -79,3 +78,13 @@ tidy:
|
|||||||
SAVE ARTIFACT go.mod AS LOCAL go.mod
|
SAVE ARTIFACT go.mod AS LOCAL go.mod
|
||||||
SAVE ARTIFACT go.sum AS LOCAL go.sum
|
SAVE ARTIFACT go.sum AS LOCAL go.sum
|
||||||
SAVE ARTIFACT vendor AS LOCAL vendor
|
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