-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (44 loc) · 1.43 KB
/
deploy-test.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
name: deploy-test
on:
push:
env:
GKE_CLUSTER: sltech-briq-k8s-cluster
GKE_ZONE: europe-west3-c
jobs:
deploy:
name: "Deploy to test env"
environment: production
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
# Configure Docker to use the gcloud command-line tool as a credential helper for authentication
- run: |-
gcloud auth configure-docker europe-west3-docker.pkg.dev
# Get the GKE credentials
- uses: google-github-actions/get-gke-credentials@main
with:
cluster_name: ${{ env.GKE_CLUSTER }}
location: ${{ env.GKE_ZONE }}
- name: Install ytt
run: |-
# Taken from install script.
binary_type=linux-amd64
ytt_version=v0.37.0
ytt_checksum=1aad12386f6bae1a78197acdc7ec9e60c441f82c4ca944df8d3c78625750fe59
wget -nv -O- https://github.com/vmware-tanzu/carvel-ytt/releases/download/${ytt_version}/ytt-${binary_type} > ytt
echo "${ytt_checksum} ytt" | shasum -c -
chmod +x ytt
sudo ln -s "$(pwd)/ytt" /usr/local/bin/ytt
ytt --version
- name: Deploy
run: |-
K8S_ENV=test infra/deploy.sh