-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (44 loc) · 1.26 KB
/
k8s-deploy.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
name: Deploy(K8S)
on:
push:
branches:
- master
jobs:
plan:
permissions:
id-token: write
pull-requests: write
name: Plan
runs-on: ubuntu-latest
strategy:
matrix:
dir: [
kubernetes/mattermost
]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check diff
id: diff
uses: technote-space/[email protected]
with:
PATTERNS: |
${{ matrix.dir }}/**/*.*
- name: Authenticate to GCP
# if: env. GIT_DIFF_FILTERED
id: gcp_auth
uses: google-github-actions/[email protected]
with:
workload_identity_provider: projects/233207969476/locations/global/workloadIdentityPools/github-action/providers/github-action-provider
service_account: [email protected]
access_token_lifetime: 1200s
- name: Get credentials
uses: google-github-actions/get-gke-credentials@v1
with:
cluster_name: primary-cluster
location: asia-northeast1
- name: Deploy
# if: env. GIT_DIFF_FILTERED
run: |-
kubectl apply -f ./kubernetes/mattermost/
kubectl -n mattermost rollout restart deployment mattermost