Skip to content

Commit

Permalink
update serverless
Browse files Browse the repository at this point in the history
  • Loading branch information
pennyZZZZ committed Sep 12, 2023
1 parent 2adbc0a commit f75d0b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
REPO_NAMES
AWS_ACCOUNT_ID
DRY_RUN
ECR_REGION
SLACK_WEBHOOK
12 changes: 6 additions & 6 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ 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:
handler: handler.cleanupImages
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}

0 comments on commit f75d0b0

Please sign in to comment.