-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.18 KB
/
cd.yaml
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: cd
on:
push:
branches: [master]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: build imagem and push to docker hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: imgabreuw/deploy-continuo-com-gitops-e-argocd
tags: ${{ github.sha }}, latest
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
steps:
- name: checkout
uses: actions/checkout@v2
- name: kustomize
uses: imranismail/setup-kustomize@v1
with:
kustomize_version: v3.6.1
- name: update k8s
run: |
cd k8s
kustomize edit set image goapp=imgabreuw/deploy-continuo-com-gitops-e-argocd:${{ github.sha }}
cat kustomization.yaml
- name: commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "Deploy Action"
git commit -am "change image tag"
- name: push
uses: ad-m/github-push-action@master