diff --git a/.github/workflows/ecr-multi-arch-deploy-dev.yml b/.github/workflows/ecr-multi-arch-deploy-dev.yml index 885b026..0dba9ae 100644 --- a/.github/workflows/ecr-multi-arch-deploy-dev.yml +++ b/.github/workflows/ecr-multi-arch-deploy-dev.yml @@ -147,6 +147,12 @@ jobs: if: ${{ steps.buildcheck.outputs.ruby_repo == '1' }} uses: ruby/setup-ruby@v1 # by default, this uses the .ruby-version file to set the version + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v6 + with: + aws-region: ${{ inputs.AWS_REGION }} + role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCT_DEV }}:role/${{ inputs.GHA_ROLE }} + - name: Run pre-build steps # Only run this step if the app developer has specified "pre-build" commands # in the caller workflow. @@ -155,12 +161,6 @@ jobs: PREBUILD: ${{ inputs.PREBUILD }} run: ${PREBUILD} - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v6 - with: - aws-region: ${{ inputs.AWS_REGION }} - role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCT_DEV }}:role/${{ inputs.GHA_ROLE }} - - name: Login to Amazon ECR id: login-ecr uses: aws-actions/amazon-ecr-login@v2 diff --git a/.github/workflows/ecr-multi-arch-deploy-stage.yml b/.github/workflows/ecr-multi-arch-deploy-stage.yml index 17d4a3e..ba7220a 100644 --- a/.github/workflows/ecr-multi-arch-deploy-stage.yml +++ b/.github/workflows/ecr-multi-arch-deploy-stage.yml @@ -139,6 +139,12 @@ jobs: if: ${{ steps.buildcheck.outputs.ruby_repo == '1' }} uses: ruby/setup-ruby@v1 # by default, this uses the .ruby-version file to set the version + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v6 + with: + aws-region: ${{ inputs.AWS_REGION }} + role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCT_STAGE }}:role/${{ inputs.GHA_ROLE }} + - name: Run pre-build steps # Only run this step if the app developer has specified "pre-build" commands # in the caller workflow. @@ -147,12 +153,6 @@ jobs: PREBUILD: ${{ inputs.PREBUILD }} run: ${PREBUILD} - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v6 - with: - aws-region: ${{ inputs.AWS_REGION }} - role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCT_STAGE }}:role/${{ inputs.GHA_ROLE }} - - name: Login to Amazon ECR id: login-ecr uses: aws-actions/amazon-ecr-login@v2