Terraform Deploy Sparta Bot #9
This file contains hidden or 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: Terraform Deploy Sparta Bot | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
terraform-sparta: | |
name: Terraform Sparta Bot | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: tooling/sparta/terraform | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
TF_VAR_bot_token: ${{ secrets.BOT_TOKEN }} | |
TF_VAR_passport_api_key: ${{ secrets.PASSPORT_API_KEY }} | |
TF_VAR_ethereum_host: ${{ secrets.ETHEREUM_HOST }} | |
TF_VAR_backend_api_key: ${{ secrets.BACKEND_API_KEY }} | |
TF_VAR_aws_region: "eu-west-2" | |
TF_VAR_environment: "production" | |
TF_VAR_bot_client_id: "1329079356785688616" | |
TF_VAR_guild_id: "1144692727120937080" | |
TF_VAR_staking_asset_handler_address: "0xF739D03e98e23A7B65940848aBA8921fF3bAc4b2" | |
TF_VAR_l1_chain_id: "11155111" | |
TF_VAR_local_dynamo_db: "false" | |
TF_VAR_dynamodb_local_endpoint: "http://localhost:8000" | |
TF_VAR_log_level: "info" | |
TF_VAR_log_pretty_print: "false" | |
TF_VAR_api_port: "3000" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: 1.5.7 | |
- name: Terraform Init | |
run: terraform init | |
- name: Terraform Format | |
run: terraform fmt -check | |
continue-on-error: true | |
- name: Terraform Validate | |
run: terraform validate | |
- name: Terraform Apply | |
run: terraform apply -auto-approve |