-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (53 loc) · 1.6 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Release
on:
push:
branches:
- master
jobs:
build:
name: Build+Push image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Login to registry
if: success()
uses: actions-hub/docker/login@master
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Build image
if: success()
run: docker build -t sakpaas/documentation:release-${GITHUB_SHA} .
- name: Tag image
if: success()
run: docker tag sakpaas/documentation:release-${GITHUB_SHA} sakpaas/documentation:latest
- name: Push <image>:release-<tag>
if: success()
uses: actions-hub/docker@master
with:
args: push sakpaas/documentation:release-${GITHUB_SHA}
- name: Push <image>:latest
if: success()
uses: actions-hub/docker@master
with:
args: push sakpaas/documentation:latest
deploy:
name: Deployment
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: 'SAKPaaS/deployment'
- name: Kustomize
uses: stefanprodan/kube-tools@v1
with:
kustomize: 3.4.0
command: "cd documentation && kustomize edit set image sakpaas/documentation=sakpaas/documentation:release-${GITHUB_SHA}"
- name: Deploy
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: apply -k documentation