From 4b94891400327cd8a19b6f6cbb4b430c39c04f36 Mon Sep 17 00:00:00 2001 From: Ronaldo Macapobre Date: Thu, 22 Aug 2024 19:04:54 +0000 Subject: [PATCH] - Renamed jasper-web to web - Declare env above runs section --- .github/workflows/actions/deploy-to-aws/action.yml | 11 ++++++----- .github/workflows/app-vue.yml | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/actions/deploy-to-aws/action.yml b/.github/workflows/actions/deploy-to-aws/action.yml index 03ab7fbd..3d29e8c5 100644 --- a/.github/workflows/actions/deploy-to-aws/action.yml +++ b/.github/workflows/actions/deploy-to-aws/action.yml @@ -32,10 +32,11 @@ inputs: description: The digest of the image to be deployed. Identifies the unique image tag in the GHCR. required: true +env: + AWS_ECR_REPO_URL: ${{ inputs.aws_account }}.dkr.ecr.${{ inputs.region }}.amazonaws.com/${{ inputs.app_name }}-ecr-repo-${{ inputs.environment }} + runs: using: composite - env: - aws_ecr_repo_url: ${{ inputs.aws_account }}.dkr.ecr.${{ inputs.region }}.amazonaws.com/${{ inputs.app_name }}-ecr-repo-${{ inputs.environment }} steps: - name: Log in to the GHCR uses: docker/login-action@v2 @@ -55,11 +56,11 @@ runs: - name: Login to AWS CLI run: | - aws ecr get-login-password --region ${{ inputs.region }} | docker login --username AWS --password-stdin ${{ env.aws_ecr_repo_url }} + aws ecr get-login-password --region ${{ inputs.region }} | docker login --username AWS --password-stdin ${{ env.AWS_ECR_REPO_URL }} - name: Tag the image in the GHCR as ${{ inputs.environment }} shell: bash run: | docker pull ${{ github_image_repo}}${{ inputs.image_name }}@${{ inputs.image_digest }} - docker tag ${{ github_image_repo}}${{ inputs.image_name }}@${{ inputs.image_digest }} ${{ env.aws_ecr_repo_url }}:${{ inputs.image_name }} - docker push ${{ env.aws_ecr_repo_url }}:${{ inputs.image_name }} + docker tag ${{ github_image_repo}}${{ inputs.image_name }}@${{ inputs.image_digest }} ${{ env.AWS_ECR_REPO_URL }}:${{ inputs.image_name }} + docker push ${{ env.AWS_ECR_REPO_URL }}:${{ inputs.image_name }} diff --git a/.github/workflows/app-vue.yml b/.github/workflows/app-vue.yml index 1267a64e..7fa31e53 100644 --- a/.github/workflows/app-vue.yml +++ b/.github/workflows/app-vue.yml @@ -13,7 +13,7 @@ on: env: WORKING_DIRECTORY: ./web - IMAGE_NAME: jasper-web + IMAGE_NAME: web GITHUB_IMAGE_REPO: ghcr.io/bcgov/jasper/ jobs: