Skip to content

Update AWS ECR Lifecycle Policy #64

Update AWS ECR Lifecycle Policy

Update AWS ECR Lifecycle Policy #64

name: Update AWS ECR Lifecycle Policy
on:
workflow_dispatch: {}
schedule:
- cron: "0 0 * * 1"
permissions:
contents: read
id-token: write
jobs:
run:
name: Update ECR Lifecycle Policy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/init
- name: Configure staging AWS credentials
uses: aws-actions/configure-aws-credentials@v2.0.0
with:
role-to-assume: arn:aws:iam::680542703984:role/github
aws-region: us-east-1
- name: Update ECR lifecycle policy in staging
run: yarn aws:update-ecr-lifecycle-policy
- name: Configure prod AWS credentials
uses: aws-actions/configure-aws-credentials@v2.0.0
with:
role-to-assume: arn:aws:iam::120317779495:role/github
aws-region: us-east-1
- name: Update ECR lifecycle policy in production
run: yarn aws:update-ecr-lifecycle-policy