Skip to content

Commit

Permalink
👷 Bun in CI, no docker caching
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed May 28, 2024
1 parent a4c7dcc commit 7cb3088
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 32 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/deploy-submodule-via-ec2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
instance-type:
required: true
type: string
folder:
required: true
type: string
pr-sha:
required: true
type: string
Expand Down Expand Up @@ -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 }}

Expand Down
30 changes: 5 additions & 25 deletions .github/workflows/deploy-submodule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
runner-label:
required: false
type: string
folder:
required: true
type: string
pr-sha:
required: true
type: string
Expand All @@ -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
Expand All @@ -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
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand All @@ -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",
Expand Down

0 comments on commit 7cb3088

Please sign in to comment.