forked from Issiki0416/2na2-Discord
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec.yml
More file actions
22 lines (20 loc) · 1.08 KB
/
buildspec.yml
File metadata and controls
22 lines (20 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
version: 0.2
# docker image build and push to ECR
phases:
install:
runtime-versions:
nodejs: latest
build:
commands:
- docker build -t $ECR_REPOSITORY:latest .
post_build:
commands:
- aws configure set region ap-northeast-1
- aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
- aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
- aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin $ECR_REGISTRY
- docker tag $ECR_REPOSITORY:latest $ECR_REGISTRY:latest
- docker push $ECR_REGISTRY:latest
- printf '[{"name":"2na2-discord","imageUri":"%s", "secrets":[{"name":"TOKEN","valueFrom":"$TOKEN"},{"name":"OPENAI_API_KEY","valueForm":"$OPENAI_API_KEY"},{"name":"DEEPL_API_KEY","valueForm":"$DEEPL_API_KEY"},{"name":"BOT_MASTER_ID","valueForm":"$BOT_MASTER_ID"},{"name":"SET_COMMANDS_TARGET_SERVERS","valueForm":"$SET_COMMANDS_TARGET_SERVERS"},{"name":"PREFIX","valueForm":"$PREFIX"}]}]' $ECR_REGISTRY:latest > imagedefinitions.json
artifacts:
files: imagedefinitions.json