Skip to content

Commit a49abde

Browse files
authored
add github actions to build and publish operator container image (#27)
1 parent 1ba17c6 commit a49abde

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish Operator
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Generate Docker Tag
15+
run: |
16+
echo ${{ github.ref }} | cut -d '/' -f 3 > DOCKER_TAG
17+
- name: Build and push container image
18+
run: |
19+
docker build --file build/Dockerfile.dist --tag movetokube/postgres-operator:$(cat DOCKER_TAG) .
20+
docker login --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_TOKEN }}
21+
docker push movetokube/postgres-operator:$(cat DOCKER_TAG)

build/Dockerfile.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.12.6-stretch
1+
FROM golang:1.13.3-stretch
22

33
COPY . /go/src/github.com/movetokube/postgres-operator
44
WORKDIR /go/src/github.com/movetokube/postgres-operator/cmd/manager

0 commit comments

Comments
 (0)