ci: adds dockerfile
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/tag Build is failing

This commit is contained in:
Marvin Steadfast 2021-05-10 13:14:15 +02:00
parent 9c9ed4e94a
commit 3b630a6dbd
3 changed files with 37 additions and 0 deletions

View File

@ -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: {}

View File

@ -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}}

View File

@ -0,0 +1,4 @@
FROM scratch
COPY schnutibox /
ENTRYPOINT ["/schnutibox"]
CMD ["web"]