diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 8adc567..6912fb4 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -7,16 +7,16 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v2 - - name: Login to Amazon ECR + - name: Login to Amazon ECR id: login-ecr uses: aws-actions/amazon-ecr-login@v2 with: registries: ${{ inputs.aws_account_id }} - - - name: Build, tag, and push image to Amazon ECR + + - name: Build, tag, and push image to Amazon ECR id: build-publish shell: bash env: @@ -24,8 +24,8 @@ jobs: ECR_REPOSITORY: ${{ env.ECR_REPO_NAME }} IMAGE_TAG: ${{ inputs.image_tag }} run: | - docker build "${{ inputs.docker_build_dir }}" -f "${{ inputs.path_to_dockerfile }}" -t "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" - docker push "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" - echo "IMAGE $IMAGE_TAG is pushed to $ECR_REGISTRY/$ECR_REPOSITORY" - echo "image_tag=$IMAGE_TAG" - echo "full_image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" \ No newline at end of file + docker build "${{ inputs.docker_build_dir }}" -f "${{ inputs.path_to_dockerfile }}" -t "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" + docker push "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" + echo "IMAGE $IMAGE_TAG is pushed to $ECR_REGISTRY/$ECR_REPOSITORY" + echo "image_tag=$IMAGE_TAG" + echo "full_image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" \ No newline at end of file