Skip to content

環境変数が足りなかったのを追加 #7

環境変数が足りなかったのを追加

環境変数が足りなかったのを追加 #7

Workflow file for this run

name: Deploy to Amazon ECR
on:
push:
branches:
- main # or the branch name you want to trigger the workflow
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to ECR
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
ECR_REGISTRY: 998159020507.dkr.ecr.us-east-1.amazonaws.com
run: |
echo $(aws ecr get-login-password) | docker login --username AWS --password-stdin $ECR_REGISTRY
- name: Build, tag, and push image to Amazon ECR
env:
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 }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG