Merge pull request #60 from mitou/chore/upgrade-mattermost #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/get-diff-action@v5.0.2 | |
with: | |
PATTERNS: | | |
${{ matrix.dir }}/**/*.* | |
- name: Authenticate to GCP | |
# if: env. GIT_DIFF_FILTERED | |
id: gcp_auth | |
uses: google-github-actions/auth@v1.0.0 | |
with: | |
workload_identity_provider: projects/233207969476/locations/global/workloadIdentityPools/github-action/providers/github-action-provider | |
service_account: ga-basic-applier@mitou-jr.iam.gserviceaccount.com | |
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 |