From 795e8d19e335be7c24d347b8ed5ec04200468a36 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 18 Sep 2025 14:14:18 -0500 Subject: [PATCH] Move ECR upload to beginning --- setup/action.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/setup/action.yml b/setup/action.yml index 1d6c213..2a14145 100644 --- a/setup/action.yml +++ b/setup/action.yml @@ -23,6 +23,17 @@ inputs: runs: using: composite steps: + # Docker login must be done before input role login so we remain logged in for S3 upload. + - name: configure aws credentials for ECR + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4 + with: + role-to-assume: ${{ inputs.ecr_role_arn }} + role-session-name: release-session + aws-region: ${{ inputs.ecr_region }} + - name: Log in to ECR + uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2 + with: + registries: "${{ inputs.ecr_registry_id }}" - name: configure aws credentials uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4 with: @@ -40,14 +51,4 @@ runs: id: setup run: ${{ github.action_path }}/setup.sh env: - AWS_SECRET_ID: ${{ inputs.aws_secret_id }} - - name: configure aws credentials for ECR - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4 - with: - role-to-assume: ${{ inputs.ecr_role_arn }} - role-session-name: release-session - aws-region: ${{ inputs.ecr_region }} - - name: Log in to ECR - uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2 - with: - registries: "${{ inputs.ecr_registry_id }}" \ No newline at end of file + AWS_SECRET_ID: ${{ inputs.aws_secret_id }} \ No newline at end of file