diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 84b7af2..52c3c42 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -9,7 +9,7 @@ jobs: aws-auth: runs-on: ubuntu-latest outputs: - output1: ${{ steps.login-ecr.outputs.registry }} + ecr_registry: ${{ steps.login-ecr.outputs.registry }} steps: - name: Configure AWS credentials @@ -29,14 +29,15 @@ jobs: needs: aws-auth steps: + - env: + ECR_REGISTRY: ${{ needs.aws-auth.outputs.ecr_registry }} + ECR_REPOSITORY: fiap-tech-challenge-api + IMAGE_TAG: latest + - name: Check out code uses: actions/checkout@v3 - - name: Build, tag, and push image to Amazon ECR - env: - ECR_REGISTRY: ${{ needs.aws-auth.outputs.output1 }} - ECR_REPOSITORY: fiap-tech-challenge-api - IMAGE_TAG: latest + - name: Build, tag, and push image to Amazon ECR run: | docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG