-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (41 loc) · 1.26 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Release
on:
push:
tags:
- "*"
jobs:
build:
name: Build new docker image and push it to DockerHub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v2
with:
go-version: 1.17.x
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build & publish container images
run: |
export VERSION=${GITHUB_REF#refs/*/}
export IMG="anbraten/external-database-operator:${VERSION}"
make build
make docker-build
make docker-push
- name: Generate latest manifest file
run: |
export VERSION=${GITHUB_REF#refs/*/}
export IMG="anbraten/external-database-operator:${VERSION}"
make generate-manifests
- name: Release latest manifest
uses: softprops/action-gh-release@v1
with:
files: deploy/external-database-controller.yml