-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (53 loc) · 1.95 KB
/
client-server.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Glue Client CI/CD Pipeline
on:
push:
branches: ["main"]
permissions:
contents: read
jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: ENV File 설정중
run: |
touch .env
echo "${{ secrets.ENV }}" >> .env
shell: bash
- name: 도커 레지스트리 로그인중...
uses: docker/login-action@v2
with:
registry: ${{ secrets.GLUE_PROJECT }}
username: ${{ secrets.ACCESS_ID }}
password: ${{ secrets.ACCESS_SECRET }}
- name: 카카오 클라우드에 빌드 및 푸시중..
uses: docker/build-push-action@v4
with:
file: Dockerfile
context: .
push: true
tags: ${{ secrets.GLUE_PROJECT }}/glue-repository/glue-client:${{ github.sha }}
update-manifest-state:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: glue-msa-config 레포지토리 체크중..
uses: actions/checkout@v3
with:
repository: ${{ secrets.GIT_PROJECT }}/glue-msa-config
token: ${{ secrets.GIT_TOKEN }}
ref: "main"
- name: yq 설치중..
run: sudo snap install yq
- name: 배포 파일에서 이미지 업데이트중..
run: |
yq e '.spec.template.spec.containers[0].image = "${{ secrets.GLUE_PROJECT }}/glue-repository/glue-client:${{ github.sha }}"' -i ./k8s-template/client-deployment.yaml
- name: 커밋 및 푸시중..
run: |
git config --global user.email "${{ secrets.EMAIL }}"
git config --global user.name "${{ secrets.USERNAME }}"
git add .
git commit -m "[skip ci] Update glue-client-deployment.yaml"
git remote set-url origin https://${{ secrets.GIT_TOKEN }}@github.com/${{ secrets.GIT_PROJECT }}/glue-msa-config
git push --set-upstream origin main