Skip to content

Commit

Permalink
reverted GHA workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaus-near committed Nov 10, 2023
1 parent 2a0692a commit 13572f0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/terraform-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ jobs:
id: plan
run: |
terraform plan -input=false -no-color -lock-timeout=1h -var-file terraform-dev.tfvars \
-var "credentials=$GOOGLE_CREDENTIALS"
-var "credentials=$GOOGLE_CREDENTIALS" \
-var docker_image=us-east1-docker.pkg.dev/pagoda-discovery-platform-dev/mpc-recovery/mpc-recovery-dev:${{ github.sha }}
env:
GOOGLE_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS_DEV }}

Expand Down Expand Up @@ -140,6 +141,7 @@ jobs:
if: github.ref == 'refs/heads/develop' && github.event_name == 'push'
run: |
terraform apply -auto-approve -input=false -lock-timeout=1h -var-file terraform-dev.tfvars \
-var "credentials=$GOOGLE_CREDENTIALS"
-var "credentials=$GOOGLE_CREDENTIALS" \
-var docker_image=us-east1-docker.pkg.dev/pagoda-discovery-platform-dev/mpc-recovery/mpc-recovery-dev:${{ github.sha }}
env:
GOOGLE_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS_DEV }}
14 changes: 9 additions & 5 deletions .github/workflows/terraform-feature-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,22 @@ jobs:
GOOGLE_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS_DEV }}
PR_NUMBER: ${{ env.PR_NUMBER }}

# Build Docker image.
- name: Docker Image
id: build
run: docker build .. -t near/mpc-recovery
- name: Wait for Docker Image to be Ready
uses: lewagon/wait-on-check-action@v1.3.1
with:
ref: ${{ github.event.pull_request.head.sha }}
check-name: 'Build and Push'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10

# Applies Terraform configuration to the temporary environment
- name: Terraform Apply
id: apply
run: |
terraform apply -auto-approve -input=false -no-color -lock-timeout=1h -var-file terraform-dev.tfvars \
-var "credentials=$GOOGLE_CREDENTIALS" \
-var "env=dev-$PR_NUMBER"
-var "env=dev-$PR_NUMBER" \
-var docker_image=us-east1-docker.pkg.dev/pagoda-discovery-platform-dev/mpc-recovery/mpc-recovery-dev:${{ github.sha }}
env:
GOOGLE_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS_DEV }}
PR_NUMBER: ${{ env.PR_NUMBER }}
Expand Down

0 comments on commit 13572f0

Please sign in to comment.