Skip to content

Commit

Permalink
Update ecr-push.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
slawler authored Oct 24, 2024
1 parent dee2b35 commit e9e6e35
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/ecr-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ jobs:
id: build-publish
shell: bash
env:
ECR_REGISTRY: "dewberry"
ECR_REPOSITORY: ${{ secrets.ECR_REPO_NAME }}
REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
REGISTRY_ALIAS: "dewberry"
REPOSITORY: "ras-stac"
IMAGE_TAG: ${{ github.sha }}
run: |
docker build . -t "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
docker push "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
docker tag "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" "$ECR_REGISTRY/$ECR_REPOSITORY:latest"
docker push "$ECR_REGISTRY/$ECR_REPOSITORY:latest"
echo "IMAGE $IMAGE_TAG is pushed to $ECR_REGISTRY/$ECR_REPOSITORY"
echo "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG overwrote $ECR_REGISTRY/$ECR_REPOSITORY:latest"
docker build . -t "$REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG"
docker push "$REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG"
docker tag "$REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG" "$ECR_REGISTRY/$ECR_REPOSITORY:latest"
docker push "$REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:latest"
echo "IMAGE $IMAGE_TAG is pushed to $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY"
echo "$REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG overwrote $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:latest"

0 comments on commit e9e6e35

Please sign in to comment.