diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 35e18d9..f0ddc91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: group: ${{ github.workflow }}-release-${{ github.ref_name }} cancel-in-progress: false environment: - name: release + name: release-ecr steps: # Use a merge queue to avoid `main` commit race conditions. @@ -39,4 +39,4 @@ jobs: run: uv run task build - name: Release (ECR) - run: uv run task release-ecr-no-build + run: uv run task release-ecr-no-build {{.ECR_REPOSITORY_URL}} diff --git a/Taskfile.yml b/Taskfile.yml index d5fc09d..029d313 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -7,6 +7,8 @@ vars: DOCKER_IMAGE_TAG: sh: ./scripts/get-version.sh DOCKER_IMAGE: "{{.DOCKER_IMAGE_NAME}}:{{.DOCKER_IMAGE_TAG}}" + ECR_REPOSITORY_URL: + sh: echo $ECR_REPOSITORY_URL tasks: default: @@ -83,10 +85,10 @@ tasks: deps: - build cmds: - - ./scripts/release-ecr.sh + - ./scripts/release-ecr.sh {{.ECR_REPOSITORY_URL}} release-ecr-no-build: desc: Release the Docker image to ECR without building it first run: once cmds: - - ./scripts/release-ecr.sh + - ./scripts/release-ecr.sh {{.ECR_REPOSITORY_URL}} diff --git a/scripts/release-ecr.sh b/scripts/release-ecr.sh index b0b905b..6cee999 100755 --- a/scripts/release-ecr.sh +++ b/scripts/release-ecr.sh @@ -2,7 +2,7 @@ set -euo pipefail -ECR_REPOSITORY_URL="${1:-$ECR_REPOSITORY_URL}" +ECR_REPOSITORY_URL="$1" IMAGE_NAME="$(echo "$ECR_REPOSITORY_URL" | cut -d '/' -f 2)" IMAGE_TAG="$(./scripts/get-version.sh)"