From 21408fce67b81c194545ca8f35eec91e5db69ed9 Mon Sep 17 00:00:00 2001 From: na2na-p Date: Wed, 21 Dec 2022 02:28:51 +0900 Subject: [PATCH 1/2] Fix push ecr conditions --- .github/workflows/push-ecr.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/push-ecr.yml b/.github/workflows/push-ecr.yml index 84aab044..cd8850e6 100644 --- a/.github/workflows/push-ecr.yml +++ b/.github/workflows/push-ecr.yml @@ -1,10 +1,6 @@ name: Build and Push to ECR -on: - push: - branches: - - main - workflow_dispatch: +on: workflow_dispatch jobs: build-and-push: From 8fbd90c537dd97e4311c4e73dfdb6a3dd2fb3457 Mon Sep 17 00:00:00 2001 From: na2na-p Date: Wed, 21 Dec 2022 03:15:03 +0900 Subject: [PATCH 2/2] Update --- buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildspec.yml b/buildspec.yml index c72f34d0..f7b37e7e 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -16,7 +16,7 @@ phases: - 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"}]' $ECR_REGISTRY:latest > imagedefinitions.json + - 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