diff --git a/.github/workflows/ecr.yml b/.github/workflows/ecr.yml index 6ae72a8..8a68cc2 100644 --- a/.github/workflows/ecr.yml +++ b/.github/workflows/ecr.yml @@ -1,9 +1,9 @@ name: Deploy to ECR on: - push: - tags: - - "v*" + release: + types: + - [published] permissions: id-token: write # This is required for requesting the JWT @@ -40,7 +40,7 @@ jobs: env: ECR_REGISTRY: ${{ steps.login-ecr-management.outputs.registry }} ECR_REPOSITORY: 671250183987.dkr.ecr.us-east-1.amazonaws.com/ml-repository - IMAGE_TAG: neuroagent-${{ github.ref_name }} + IMAGE_TAG: neuroagent-${{ github.event.release.tag_name }} run: | docker tag temp:latest $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG