#!/usr/bin/env bash

aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 038504843107.dkr.ecr.us-west-2.amazonaws.com

export TAG="latest"
docker pull "sonarsource/sonar-scanner-cli:$TAG"

docker tag "sonarsource/sonar-scanner-cli:$TAG" "038504843107.dkr.ecr.us-west-2.amazonaws.com/sonar-scanner-cli:$TAG"
docker push "038504843107.dkr.ecr.us-west-2.amazonaws.com/sonar-scanner-cli:$TAG"
