Skip to content

Commit

Permalink
auto update script
Browse files Browse the repository at this point in the history
  • Loading branch information
islandbitcoin committed Aug 28, 2023
1 parent ec75159 commit b9836e5
Showing 1 changed file with 46 additions and 51 deletions.
97 changes: 46 additions & 51 deletions .github/workflows/deploy-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,49 @@ on:
- gcp

jobs:
job_id:
# Add "id-token" with the intended permissions.
permissions:
contents: "read"
id-token: "write"
build:
env:
CLUSTER_NAME: flash-cluster
NAMESPACE: default
GALOY_NAMESPACE: galoy
GALOY_DEPS_NAMESPACE: galoy-deps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- id: "auth"
uses: "google-github-actions/auth@v1"
with:
service_account: "flash-cluster@flash-staging-cluster.iam.gserviceaccount.com"

- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1.1.1
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: flash-staging-cluster
export_default_credentials: true

- name: Configure Kubernetes Cluster
run: |
gcloud container clusters get-credentials $CLUSTER_NAME --zone us-east1
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 1.0.0

- name: Terraform Init
run: terraform init
working-directory: ./dev

- name: Terraform Validate
run: terraform validate
working-directory: ./dev

- name: Terraform Plan
run: terraform plan -var 'bitcoin_network=signet' -var 'name_prefix=galoy-sig'
working-directory: ./dev

- name: Terraform Apply
run: terraform apply -auto-approve -var 'bitcoin_network=signet' -var 'name_prefix=galoy-sig'
working-directory: ./dev
build:
env:
CLUSTER_NAME: flash-cluster
NAMESPACE: default
GALOY_NAMESPACE: galoy
GALOY_DEPS_NAMESPACE: galoy-deps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- id: "auth"
uses: "google-github-actions/auth@v1"
with:
service_account: "flash-cluster@flash-staging-cluster.iam.gserviceaccount.com"

- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1.1.1
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: flash-staging-cluster
export_default_credentials: true

- name: Configure Kubernetes Cluster
run: |
gcloud container clusters get-credentials $CLUSTER_NAME --zone us-east1
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 1.0.0

- name: Terraform Init
run: terraform init
working-directory: ./dev

- name: Terraform Validate
run: terraform validate
working-directory: ./dev

- name: Terraform Plan
run: terraform plan -var 'bitcoin_network=signet' -var 'name_prefix=galoy-sig'
working-directory: ./dev

- name: Terraform Apply
run: terraform apply -auto-approve -var 'bitcoin_network=signet' -var 'name_prefix=galoy-sig'
working-directory: ./dev

0 comments on commit b9836e5

Please sign in to comment.