Skip to content

Commit 8897a35

Browse files
committed
api refac
1 parent 985e2d5 commit 8897a35

File tree

1 file changed

+37
-16
lines changed

1 file changed

+37
-16
lines changed

.github/workflows/sparta.yml

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,6 @@ jobs:
1818
env:
1919
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
2020
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
21-
TF_VAR_bot_token: ${{ secrets.BOT_TOKEN }}
22-
TF_VAR_passport_api_key: ${{ secrets.PASSPORT_API_KEY }}
23-
TF_VAR_ethereum_host: ${{ secrets.ETHEREUM_HOST }}
24-
TF_VAR_backend_api_key: ${{ secrets.BACKEND_API_KEY }}
25-
TF_VAR_aws_region: "eu-west-2"
26-
TF_VAR_environment: "production"
27-
TF_VAR_bot_client_id: "1329079356785688616"
28-
TF_VAR_guild_id: "1144692727120937080"
29-
TF_VAR_staking_asset_handler_address: "0xF739D03e98e23A7B65940848aBA8921fF3bAc4b2"
30-
TF_VAR_l1_chain_id: "11155111"
31-
TF_VAR_local_dynamo_db: "false"
32-
TF_VAR_dynamodb_local_endpoint: "http://localhost:8000"
33-
TF_VAR_log_level: "info"
34-
TF_VAR_log_pretty_print: "false"
35-
TF_VAR_api_port: "3000"
3621

3722
steps:
3823
- name: Checkout
@@ -52,6 +37,42 @@ jobs:
5237

5338
- name: Terraform Validate
5439
run: terraform validate
40+
41+
- name: Generate terraform.production.tfvars
42+
run: |
43+
cat > terraform.production.tfvars << EOF
44+
# =============================================================================
45+
# AWS Configuration
46+
# =============================================================================
47+
aws_region = "eu-west-2"
48+
environment = "production"
49+
50+
# =============================================================================
51+
# Application Secrets & Configuration
52+
# =============================================================================
53+
54+
# --- Discord ---
55+
bot_token = "${{ secrets.BOT_TOKEN }}"
56+
bot_client_id = "1329079356785688616"
57+
guild_id = "1144692727120937080"
58+
59+
# --- Ethereum ---
60+
ethereum_host = "${{ secrets.ETHEREUM_HOST }}"
61+
staking_asset_handler_address = "0xF739D03e98e23A7B65940848aBA8921fF3bAc4b2"
62+
l1_chain_id = "11155111"
63+
64+
# --- DynamoDB ---
65+
local_dynamo_db = false
66+
dynamodb_local_endpoint = "http://localhost:8000"
67+
68+
# --- Logging ---
69+
log_level = "debug"
70+
log_pretty_print = false
71+
72+
# --- API Configuration ---
73+
api_port = 3000
74+
backend_api_key = "${{ secrets.BACKEND_API_KEY }}"
75+
EOF
5576
5677
- name: Terraform Apply
57-
run: terraform apply -auto-approve
78+
run: terraform apply -var-file="terraform.production.tfvars" -auto-approve

0 commit comments

Comments
 (0)