From 7cb3088a5a39e5326cb6de9988c512611015bfcf Mon Sep 17 00:00:00 2001 From: KONFeature Date: Tue, 28 May 2024 21:40:43 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Bun=20in=20CI,=20no=20docker=20c?= =?UTF-8?q?aching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/deploy-submodule-via-ec2.yml | 4 --- .github/workflows/deploy-submodule.yml | 30 ++++--------------- .github/workflows/deploy.yml | 1 - sst.config.ts | 4 +-- 4 files changed, 7 insertions(+), 32 deletions(-) diff --git a/.github/workflows/deploy-submodule-via-ec2.yml b/.github/workflows/deploy-submodule-via-ec2.yml index 7bbec75..ce5a6df 100644 --- a/.github/workflows/deploy-submodule-via-ec2.yml +++ b/.github/workflows/deploy-submodule-via-ec2.yml @@ -9,9 +9,6 @@ on: instance-type: required: true type: string - folder: - required: true - type: string pr-sha: required: true type: string @@ -55,7 +52,6 @@ jobs: uses: ./.github/workflows/deploy-submodule.yml with: runner-label: ${{ needs.start-runner.outputs.label }} - folder: ${{ inputs.folder }} pr-sha: ${{ inputs.pr-sha }} ref: ${{ inputs.ref }} diff --git a/.github/workflows/deploy-submodule.yml b/.github/workflows/deploy-submodule.yml index 806e6bb..7d7c075 100644 --- a/.github/workflows/deploy-submodule.yml +++ b/.github/workflows/deploy-submodule.yml @@ -6,9 +6,6 @@ on: runner-label: required: false type: string - folder: - required: true - type: string pr-sha: required: true type: string @@ -26,30 +23,15 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ inputs.pr-sha }} + - uses: oven-sh/setup-bun@v1 - - name: "🔨 Setup pnpm" + - name: "🔨 Setup bun" uses: pnpm/action-setup@v3 with: run_install: false - - name: "🔨 Setup Node.js" - id: setup-node - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - cache: "pnpm" - - - name: "🔧 Setup environment" - shell: bash - run: | - if [[ "${{ inputs.ref }}" == "refs/heads/main" ]]; then - echo "STAGE=prod" >> $GITHUB_ENV - elif [[ "${{ inputs.ref }}" == "refs/heads/staging" ]]; then - echo "STAGE=dev" >> $GITHUB_ENV - fi - - name: "🔨 Install dependencies" - run: pnpm install --frozen-lockfile + run: bun install --frozen-lockfile - name: "👥 Configure AWS Credentials" uses: aws-actions/configure-aws-credentials@v4 @@ -59,10 +41,8 @@ jobs: retry-max-attempts: 5 - name: "🚀 SST Deploy" - working-directory: ${{ inputs.folder }} env: STAGE_OVERRIDE: ${{ inputs.stage-override }} run: | - STAGE=${STAGE_OVERRIDE:-$STAGE} - echo "Deploying with stage: $STAGE" - pnpm sst deploy --stage $STAGE + echo "Deploying with stage: prod" + pnpm sst deploy --stage prod diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b409783..9ec5a1a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,6 +32,5 @@ jobs: # Need a custom ami image id since it's needing docker for the build process ami-image-id: ami-0e2a787a966f10c15 instance-type: t4g.small - folder: ./tools pr-sha: ${{ github.event.pull_request.head.sha }} ref: ${{ github.ref }} diff --git a/sst.config.ts b/sst.config.ts index 90d9910..e77f81e 100644 --- a/sst.config.ts +++ b/sst.config.ts @@ -56,7 +56,7 @@ function IndexerStack({ app, stack }: StackContext) { }, // Setup some build options build: { - cacheTo: { + /*cacheTo: { type: "registry", params: { ref: `${app.account}.dkr.ecr.eu-west-1.amazonaws.com/indexer-cache:latest`, @@ -68,7 +68,7 @@ function IndexerStack({ app, stack }: StackContext) { params: { ref: `${app.account}.dkr.ecr.eu-west-1.amazonaws.com/indexer-cache:latest` } - }] + }]*/ }, // Arm architecture (lower cost) architecture: "arm64",