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
|
- name: release
|
||||||
image: goreleaser/goreleaser:v0.162.0
|
image: goreleaser/goreleaser:v0.162.0
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
environment:
|
environment:
|
||||||
GITHUB_TOKEN:
|
GITHUB_TOKEN:
|
||||||
from_secret: github_token
|
from_secret: github_token
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: github_token
|
||||||
|
DOCKER_REGISTRY: ghcr.io
|
||||||
commands:
|
commands:
|
||||||
|
- sleep 5
|
||||||
|
- >
|
||||||
|
echo $DOCKER_PASSWORD |
|
||||||
|
docker login $DOCKER_REGISTRY -u $DOCKER_USERNAME --password-stdin
|
||||||
- goreleaser release --rm-dist
|
- goreleaser release --rm-dist
|
||||||
depends_on:
|
depends_on:
|
||||||
- tags
|
- tags
|
||||||
@ -50,3 +62,15 @@ steps:
|
|||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- 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:
|
github:
|
||||||
owner: xsteadfastx
|
owner: xsteadfastx
|
||||||
name: schnutibox
|
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