Stop Staging Cluster #60
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: Stop Staging Cluster | |
on: [workflow_dispatch] | |
jobs: | |
stop-stage: | |
runs-on: ubuntu-latest | |
steps: | |
- id: 'auth' | |
name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
credentials_json: ${{ secrets.GCLOUD_SA_KEY }} | |
- id: 'get-credentials' | |
uses: 'google-github-actions/get-gke-credentials@v1' | |
with: | |
cluster_name: ${{ env.GKE_CLUSTER }} | |
location: ${{ env.GKE_ZONE }} | |
project_id: ${{ secrets.GCLOUD_PROJECT_ID }} | |
- name: GCloud setup | |
uses: 'google-github-actions/setup-gcloud@v1' | |
with: | |
project_id: ${{ secrets.GCLOUD_PROJECT_ID }} | |
- name: Stop stage | |
run: gcloud container clusters delete "$GKE_CLUSTER" --zone "$GKE_ZONE" --quiet | |
env: | |
GKE_CLUSTER: "staging" | |
GKE_ZONE: "us-central1-a" |