-
Notifications
You must be signed in to change notification settings - Fork 16
44 lines (41 loc) · 1.35 KB
/
service-release-channel.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
name: Deploy into release channel
on:
push:
branches:
- 'releases/*'
jobs:
release:
runs-on: ubuntu-latest
env:
CLOUDSDK_CORE_PROJECT: cal-itp-data-infra
GKE_NAME: data-infra-apps
GKE_REGION: us-west1
USE_GKE_GCLOUD_AUTH_PLUGIN: True
steps:
# Setup
- name: Check out repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- uses: google-github-actions/setup-gcloud@v2
- name: install auth plugin
run: gcloud components install gke-gcloud-auth-plugin
- uses: google-github-actions/get-gke-credentials@v1
with:
cluster_name: ${{ env.GKE_NAME }}
location: ${{ env.GKE_REGION }}
- run: curl -sSL https://install.python-poetry.org | python -
# Release to channel
- id: poetry-invoke
name: Run poetry invoke
shell: bash
working-directory: ci
run: |
export RELEASE_CHANNEL=${GITHUB_REF#refs/heads/releases/}
printf 'WORKFLOW: service-release-channel; RELEASE_CHANNEL=%s\n' "$RELEASE_CHANNEL"
poetry install
poetry run invoke secrets -f "./channels/$RELEASE_CHANNEL.yaml"
poetry run invoke release -f "./channels/$RELEASE_CHANNEL.yaml"