{"id":13617454,"url":"https://github.com/int128/create-ecr-repository-action","last_synced_at":"2026-05-23T18:01:38.340Z","repository":{"id":37038818,"uuid":"357401855","full_name":"int128/create-ecr-repository-action","owner":"int128","description":"Action to create Amazon ECR or ECR Public repository and put lifecycle policy","archived":false,"fork":false,"pushed_at":"2026-05-16T00:41:12.000Z","size":57364,"stargazers_count":17,"open_issues_count":7,"forks_count":15,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-16T03:09:43.810Z","etag":null,"topics":["amazon-ecr","aws","github-actions","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/int128.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-04-13T02:36:05.000Z","updated_at":"2026-05-16T00:40:03.000Z","dependencies_parsed_at":"2023-09-24T05:26:22.509Z","dependency_job_id":"709c8697-fd66-485e-8140-3307d854664b","html_url":"https://github.com/int128/create-ecr-repository-action","commit_stats":{"total_commits":811,"total_committers":3,"mean_commits":270.3333333333333,"dds":0.06041923551171391,"last_synced_commit":"6ec2809243ea2f9b90d66bd5b268bb2562eb4bd5"},"previous_names":[],"tags_count":463,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/int128/create-ecr-repository-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fcreate-ecr-repository-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fcreate-ecr-repository-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fcreate-ecr-repository-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fcreate-ecr-repository-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/int128","download_url":"https://codeload.github.com/int128/create-ecr-repository-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fcreate-ecr-repository-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33406444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-ecr","aws","github-actions","typescript"],"created_at":"2024-08-01T20:01:41.916Z","updated_at":"2026-05-23T18:01:38.314Z","avatar_url":"https://github.com/int128.png","language":"TypeScript","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# create-ecr-repository-action [![ts](https://github.com/int128/create-ecr-repository-action/actions/workflows/ts.yaml/badge.svg)](https://github.com/int128/create-ecr-repository-action/actions/workflows/ts.yaml)\n\nThis is a GitHub Action to create a repository into Amazon ECR or ECR Public registry if it does not exist.\nIt can put a lifecycle policy to the repository for cost saving.\n\n\n## Getting Started\n\nTo create a repository:\n\n```yaml\njobs:\n  build:\n    steps:\n      - uses: int128/create-ecr-repository-action@v1\n        with:\n          repository: hello-world\n```\n\nIf the repository exists, this action does nothing.\n\n\n### Put a lifecycle policy\n\nTo create a repository with a lifecycle policy:\n\n```yaml\n      - uses: int128/create-ecr-repository-action@v1\n        with:\n          repository: hello-world\n          lifecycle-policy: config/lifecycle-policy.json\n```\n\nIf the repository exists, this action just puts the lifecycle policy.\n\n\n### Create into ECR Public\n\nTo create a repository into ECR Public registry:\n\n```yaml\n      - uses: int128/create-ecr-repository-action@v1\n        with:\n          repository: hello-world\n          public: true\n```\n\nIf the repository exists, this action does nothing.\nNote that currently ECR Public does not support the lifecycle polocy.\n\n\n### Full example\n\nHere is a full example to build an image and put it into an ECR repository:\n\n```yaml\njobs:\n  build:\n    runs-on: ubuntu-latest\n    permissions:\n      id-token: write\n      contents: read\n    steps:\n      - uses: aws-actions/configure-aws-credentials@v1\n        with:\n          role-to-assume: arn:aws:iam::ACCOUNT:role/ROLE\n      - uses: aws-actions/amazon-ecr-login@v1\n      - uses: int128/create-ecr-repository-action@v1\n        id: ecr\n        with:\n          repository: ${{ github.repository }}\n      - uses: docker/metadata-action@v4\n        id: metadata\n        with:\n          images: ${{ steps.ecr.outputs.repository-uri }}\n      - uses: docker/build-push-action@v3\n        with:\n          push: true\n          tags: ${{ steps.metadata.outputs.tags }}\n          labels: ${{ steps.metadata.outputs.labels }}\n```\n\n\n## Inputs\n\n| Name | Default | Description\n|------|---------|------------\n| `public` | `false` | Set `true` to create into ECR Public registry\n| `repository` | (required) | Repository name to create\n| `lifecycle-policy` | - | Path to a file of lifecycle policy for the repository\n| `repository-policy` | - |  Path to a file of repository policy for the repository\n\n## Outputs\n\n| Name | Description\n|------|------------\n| `repository-uri` | URI of the repository (in form of `ACCOUNT.dkr.ecr.REGION.amazonaws.com/NAME` or `public.ecr.aws/ID/NAME`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Fcreate-ecr-repository-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fint128%2Fcreate-ecr-repository-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Fcreate-ecr-repository-action/lists"}