mirror of
https://github.com/mcuadros/ascode
synced 2024-11-22 17:02:03 +01:00
ci: docker build based on github actions
This commit is contained in:
parent
239a9ab9c0
commit
050d289620
16
.github/workflows/docker.yml
vendored
Normal file
16
.github/workflows/docker.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
name: Docker Push
|
||||
on: [push, create]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build Docker image
|
||||
uses: mr-smithers-excellent/docker-build-push@v2
|
||||
with:
|
||||
image: mcuadros/ascode
|
||||
registry: docker.io
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM golang:1.14.0-alpine AS builder
|
||||
WORKDIR $GOPATH/src/github.com/mcuadros/ascode
|
||||
COPY . .
|
||||
RUN GO111MODULE=on CGO_ENABLED=0 GOPROXY="https://proxy.golang.org" go build -o /bin/ascode .
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk --no-cache add ca-certificates
|
||||
COPY --from=builder /bin/ascode /bin/ascode
|
||||
CMD ["ascode"]
|
Loading…
Reference in New Issue
Block a user