-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (67 loc) · 2.31 KB
/
auth-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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Glue Auth Server CI/CD
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set environment yml file
run: |
mkdir ./src/main/resources
cd ./src/main/resources
touch ./application.yml
echo "${{ secrets.APPLICATION }}" >> ./application.yml
shell: bash
# gradlew 권한 변경
- name: Grant execute permission for gradlew
run : chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Login KakaoCloud
uses: docker/login-action@v2
with:
registry: ${{ secrets.GLUE_PROJECT }}
username: ${{ secrets.ACCESS_ID }}
password: ${{ secrets.ACCESS_SECRET }}
- name: Build and Push to KakaoCloud
uses: docker/build-push-action@v4
with:
file: Dockerfile
context: .
push: true
tags: ${{ secrets.GLUE_PROJECT }}/glue-repository/glue-auth:${{ github.sha }}
update-manifest-state:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Checkout glue-msa-config repository
uses: actions/checkout@v3
with:
repository: ${{ secrets.GIT_PROJECT }}/glue-msa-config
token: ${{ secrets.GIT_TOKEN}}
ref: "main"
- name: Install yq
run: sudo snap install yq
- name: Update image in deployment file
run: |
yq e '.spec.template.spec.containers[0].image = "${{ secrets.GLUE_PROJECT }}/glue-repository/glue-auth:${{ github.sha }}"' ./k8s-template/auth-deployment.yaml -i
- name: Commit and Push changes
run: |
git config --global user.email "${{ secrets.EMAIL }}"
git config --global user.name "${{ secrets.USERNAME }}"
git add .
git commit -m "[skip ci] Update deployment-server.yaml"
git remote set-url origin https://${{ secrets.GIT_TOKEN }}@github.com/${{ secrets.GIT_PROJECT }}/glue-msa-config
git push --set-upstream origin main