From ade4f021613f7bd539e536b94e8cf41f7eb82bb9 Mon Sep 17 00:00:00 2001 From: fernandoataoldotcom Date: Sat, 14 Oct 2023 23:58:11 +0000 Subject: [PATCH] fix(gha-build-ecr): learning how inputs work --- .github/workflows/test-action-on-pr.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-action-on-pr.yml b/.github/workflows/test-action-on-pr.yml index 9dce79a..693412f 100644 --- a/.github/workflows/test-action-on-pr.yml +++ b/.github/workflows/test-action-on-pr.yml @@ -13,6 +13,7 @@ jobs: run: | echo "TEST_IMAGE_NAME=glueops/github-actions-build-push-containers/test-github-actions-build-push-containers" >> $GITHUB_ENV echo "ECR_REGISTRY=616531474007.dkr.ecr.us-west-2.amazonaws.com" >> $GITHUB_ENV + echo "AWS_REGION=us-west-2" >> $GITHUB_ENV - name: Checkout code uses: actions/checkout@v3 @@ -36,13 +37,13 @@ jobs: with: aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws_default_region: "us-west-2" + aws_default_region: ${{ env.AWS_REGION }} image_name: ${{ env.TEST_IMAGE_NAME }} registry: ${{ env.ECR_REGISTRY }} - name: verify ecr run: | - echo $(aws ecr get-login-password --region ${{ inputs.aws_default_region }}) \ + echo $(aws ecr get-login-password --region $AWS_REGION) \ | docker login --username AWS --password-stdin ${{ inputs.registry }} docker pull $ECR_REGISTRY/$TEST_IMAGE_NAME:${{ github.sha }} docker run $ECR_REGISTRY/$TEST_IMAGE_NAME:${{ github.sha }}