ci: adds dockerfile
This commit is contained in:
parent
9c9ed4e94a
commit
3b630a6dbd
24
.drone.yml
24
.drone.yml
@ -38,10 +38,22 @@ steps:
|
||||
|
||||
- name: release
|
||||
image: goreleaser/goreleaser:v0.162.0
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
environment:
|
||||
GITHUB_TOKEN:
|
||||
from_secret: github_token
|
||||
DOCKER_USERNAME:
|
||||
from_secret: docker_username
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: github_token
|
||||
DOCKER_REGISTRY: ghcr.io
|
||||
commands:
|
||||
- sleep 5
|
||||
- >
|
||||
echo $DOCKER_PASSWORD |
|
||||
docker login $DOCKER_REGISTRY -u $DOCKER_USERNAME --password-stdin
|
||||
- goreleaser release --rm-dist
|
||||
depends_on:
|
||||
- tags
|
||||
@ -50,3 +62,15 @@ steps:
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
services:
|
||||
- name: docker
|
||||
image: docker:dind
|
||||
privileged: true
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
|
||||
volumes:
|
||||
- name: dockersock
|
||||
temp: {}
|
||||
|
@ -41,3 +41,12 @@ release:
|
||||
github:
|
||||
owner: xsteadfastx
|
||||
name: schnutibox
|
||||
|
||||
dockers:
|
||||
- dockerfile: build/package/docker/Dockerfile
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
image_templates:
|
||||
- ghcr.io/xsteadfastx/schnutibox:latest
|
||||
- ghcr.io/xsteadfastx/schnutibox:{{ .Tag }}
|
||||
- ghcr.io/xsteadfastx/schnutibox:v{{ .Major}}
|
||||
|
4
build/package/docker/Dockerfile
Normal file
4
build/package/docker/Dockerfile
Normal file
@ -0,0 +1,4 @@
|
||||
FROM scratch
|
||||
COPY schnutibox /
|
||||
ENTRYPOINT ["/schnutibox"]
|
||||
CMD ["web"]
|
Loading…
Reference in New Issue
Block a user