From c60c98d77ff532317c9511cd806a03369aac2740 Mon Sep 17 00:00:00 2001 From: Gerald Iakobinyi-Pich Date: Wed, 24 Jul 2024 09:37:17 +0300 Subject: [PATCH] fix: removing unused env, using aws actions from gh-workflows --- .github/workflows/build_and_deploy_generic.yml | 12 ++++++------ .github/workflows/deploy_generic.yml | 18 +++++++----------- infra/aws/index.ts | 4 +--- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_and_deploy_generic.yml b/.github/workflows/build_and_deploy_generic.yml index 8bf2dc3..fd014e9 100644 --- a/.github/workflows/build_and_deploy_generic.yml +++ b/.github/workflows/build_and_deploy_generic.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - id: ref - uses: passportxyz/gh-workflows/.github/actions/load_commit_ref@main + uses: passportxyz/gh-workflows/.github/actions/load_commit_ref@fix_build_dir with: commit: ${{ inputs.commit }} @@ -42,7 +42,7 @@ jobs: AWS_ACCESS_KEY_ID: op://DevOps/passport-scroll-badge-service-${{ inputs.environment }}-secrets/ci/AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY: op://DevOps/passport-scroll-badge-service-${{ inputs.environment }}-secrets/ci/AWS_SECRET_ACCESS_KEY - id: build_and_push_docker_image - uses: passportxyz/gh-workflows/.github/actions/build_and_push@main + uses: passportxyz/gh-workflows/.github/actions/build_and_push@fix_build_dir with: refspec: ${{ needs.ref.outputs.refspec }} docker_tag: ${{ needs.ref.outputs.docker_tag }} @@ -79,9 +79,9 @@ jobs: AWS_SECRET_ACCESS_KEY: op://DevOps/passport-scroll-badge-service-${{ inputs.environment }}-secrets/ci/AWS_SECRET_ACCESS_KEY PULUMI_ACCESS_TOKEN: op://DevOps/passport-scroll-badge-service-${{ inputs.environment }}-secrets/ci/PULUMI_ACCESS_TOKEN - name: Prepare to Deploy to AWS - uses: ./.github/actions/prepare_deploy_to_aws + uses: passportxyz/gh-workflows/.github/actions/prepare_deploy_to_aws@fix_build_dir - name: Deploy Preview - uses: ./.github/actions/deploy_to_aws + uses: passportxyz/gh-workflows/.github/actions/deploy_to_aws@fix_build_dir with: docker_tag: ${{ needs.ref.outputs.docker_tag }} stack_name: gitcoin/scroll-badge-service/${{ inputs.environment }} @@ -129,9 +129,9 @@ jobs: AWS_SECRET_ACCESS_KEY: op://DevOps/passport-scroll-badge-service-${{ inputs.environment }}-secrets/ci/AWS_SECRET_ACCESS_KEY PULUMI_ACCESS_TOKEN: op://DevOps/passport-scroll-badge-service-${{ inputs.environment }}-secrets/ci/PULUMI_ACCESS_TOKEN - name: Prepare to Deploy to AWS - uses: ./.github/actions/prepare_deploy_to_aws + uses: passportxyz/gh-workflows/.github/actions/prepare_deploy_to_aws@fix_build_dir - name: Deploy Review - uses: ./.github/actions/deploy_to_aws + uses: passportxyz/gh-workflows/.github/actions/deploy_to_aws@fix_build_dir with: docker_tag: ${{ needs.ref.outputs.docker_tag }} stack_name: gitcoin/scroll-badge-service/${{ inputs.environment }} diff --git a/.github/workflows/deploy_generic.yml b/.github/workflows/deploy_generic.yml index 19a7744..1c93653 100644 --- a/.github/workflows/deploy_generic.yml +++ b/.github/workflows/deploy_generic.yml @@ -55,9 +55,9 @@ jobs: SCROLL_SECRETS_ARN: op://DevOps/passport-scroll-badge-service-${{ inputs.environment }}-env/service/SCROLL_SECRETS_ARN VC_SECRETS_ARN: op://DevOps/passport-scroll-badge-service-${{ inputs.environment }}-env/service/VC_SECRETS_ARN - name: Prepare to Deploy to AWS - uses: ./.github/actions/prepare_deploy_to_aws - - name: Preview Deploy - uses: ./.github/actions/deploy_to_aws + uses: passportxyz/gh-workflows/.github/actions/prepare_deploy_to_aws@fix_build_dir + - name: Deploy Review + uses: passportxyz/gh-workflows/.github/actions/deploy_to_aws@fix_build_dir with: docker_tag: ${{ needs.ref.outputs.docker_tag }} stack_name: gitcoin/scroll-badge-service/${{ inputs.environment }} @@ -67,9 +67,7 @@ jobs: AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} PULUMI_ACCESS_TOKEN: ${{ env.PULUMI_ACCESS_TOKEN }} - ROUTE_53_DOMAIN: ${{ env.ROUTE_53_DOMAIN }} - SCROLL_SECRETS_ARN: ${{ env.SCROLL_SECRETS_ARN }} - VC_SECRETS_ARN: ${{ env.VC_SECRETS_ARN }} + OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} deploy_confirm: name: Review Approval Pending @@ -110,9 +108,9 @@ jobs: SCROLL_SECRETS_ARN: op://DevOps/passport-scroll-badge-service-${{ inputs.environment }}-env/service/SCROLL_SECRETS_ARN VC_SECRETS_ARN: op://DevOps/passport-scroll-badge-service-${{ inputs.environment }}-env/service/VC_SECRETS_ARN - name: Prepare to Deploy to AWS - uses: ./.github/actions/prepare_deploy_to_aws + uses: passportxyz/gh-workflows/.github/actions/prepare_deploy_to_aws@fix_build_dir - name: Deploy Review - uses: ./.github/actions/deploy_to_aws + uses: passportxyz/gh-workflows/.github/actions/deploy_to_aws@fix_build_dir with: docker_tag: ${{ needs.ref.outputs.docker_tag }} stack_name: gitcoin/scroll-badge-service/${{ inputs.environment }} @@ -120,6 +118,4 @@ jobs: AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} PULUMI_ACCESS_TOKEN: ${{ env.PULUMI_ACCESS_TOKEN }} - ROUTE_53_DOMAIN: ${{ env.ROUTE_53_DOMAIN }} - SCROLL_SECRETS_ARN: ${{ env.SCROLL_SECRETS_ARN }} - VC_SECRETS_ARN: ${{ env.VC_SECRETS_ARN }} + OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} \ No newline at end of file diff --git a/infra/aws/index.ts b/infra/aws/index.ts index 9c1415b..768aa6e 100644 --- a/infra/aws/index.ts +++ b/infra/aws/index.ts @@ -20,9 +20,7 @@ export const VC_SECRETS_ARN = op.read.parse( `op://DevOps/passport-scroll-badge-service-${stack}-env/ci/VC_SECRETS_ARN` ); -export const DOCKER_IMAGE_TAG = `${ - process.env.SCROLL_BADGE_SERVICE_IMAGE_TAG || "" -}`; +export const DOCKER_IMAGE_TAG = `${process.env.DOCKER_IMAGE_TAG || ""}`; const current = aws.getCallerIdentity({}); const regionData = aws.getRegion({});