diff --git a/.env b/.env new file mode 100644 index 0000000..ebe672d --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +REPO_NAMES +AWS_ACCOUNT_ID +DRY_RUN +ECR_REGION +SLACK_WEBHOOK \ No newline at end of file diff --git a/serverless.yml b/serverless.yml index 73ac736..2f74c09 100644 --- a/serverless.yml +++ b/serverless.yml @@ -12,12 +12,6 @@ provider: Action: - "ecr:*" Resource: "*" - environment: - REPO_NAMES: ${env:REPO_NAMES} - AWS_ACCOUNT_ID: ${env:AWS_ACCOUNT_ID} - DRY_RUN: ${env:DRY_RUN, 'true'} - ECR_REGION: ${env:ECR_REGION, 'us-east-1'} - SLACK_WEBHOOK: ${env:SLACK_WEBHOOK} functions: cleanupImages: @@ -25,3 +19,9 @@ functions: timeout: 45 events: - schedule: rate(1 day) + environment: + REPO_NAMES: ${env:REPO_NAMES} + AWS_ACCOUNT_ID: ${env:AWS_ACCOUNT_ID} + DRY_RUN: ${env:DRY_RUN, 'true'} + ECR_REGION: ${env:ECR_REGION, 'us-east-1'} + SLACK_WEBHOOK: ${env:SLACK_WEBHOOK}