Skip to content

Commit

Permalink
レジストリをハードコーディング
Browse files Browse the repository at this point in the history
  • Loading branch information
inai17ibar committed Oct 21, 2023
1 parent 1871b75 commit 6515a48
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/deploy-to-ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Debug AWS variables
run: |
echo AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION
- name: Install AWS CLI
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
- name: Login to ECR using AWS CLI
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
$(aws ecr get-login --no-include-email --region us-east-1)
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
env:
AWS_DEFAULT_REGION: us-east-1

- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REGISTRY: 998159020507.dkr.ecr.us-east-1.amazonaws.com
ECR_REPOSITORY: todo-weed-repository
IMAGE_TAG: latest # or any other tag
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
Expand Down

0 comments on commit 6515a48

Please sign in to comment.