Skip to content

Commit

Permalink
fix: removing unused env, using aws actions from gh-workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nutrina committed Jul 24, 2024
1 parent e9e3692 commit c60c98d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build_and_deploy_generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/deploy_generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -110,16 +108,14 @@ 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 }}
aws_region: us-west-2
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 }}
4 changes: 1 addition & 3 deletions infra/aws/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({});
Expand Down

0 comments on commit c60c98d

Please sign in to comment.