Skip to content

Commit f471ff8

Browse files
author
k.trufanov
committed
add files
1 parent e887cf5 commit f471ff8

File tree

5 files changed

+1074
-0
lines changed

5 files changed

+1074
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish Docker image
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
push_to_registry:
7+
name: Push Docker image to Docker Hub
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out the repo
11+
uses: actions/checkout@v2
12+
- name: Push to Docker Hub
13+
uses: docker/build-push-action@v1
14+
with:
15+
username: ${{ secrets.DOCKER_USERNAME }}
16+
password: ${{ secrets.DOCKER_PASSWORD }}
17+
repository: ktrufanov/k8s-calico-networksets-controller
18+
tag_with_ref: true

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM golang:1.15 AS builder
2+
3+
WORKDIR $GOPATH/src/github.com/ktrufanov/k8s-calico-networksets-controller
4+
COPY . .
5+
RUN CGO_ENABLED=0 GOOS=linux go build -o /calico-networksets-controller calico-networksets-controller.go
6+
FROM alpine:latest
7+
COPY --from=builder /calico-networksets-controller /calico-networksets-controller
8+
9+
CMD ["./calico-networksets-controller"]

0 commit comments

Comments
 (0)