mirror of https://github.com/buster-so/buster.git
Refine deployment workflow conditions and clean up Docker build process. Update deploy.yml to restrict deployment triggers to main and staging branches, and remove unnecessary sticky disk setup in docker-build-server.yml.
This commit is contained in:
parent
c7cc610d73
commit
30cf0c5892
|
@ -5,11 +5,10 @@ on:
|
|||
workflows: ["Build and Push Server Docker Image"]
|
||||
types:
|
||||
- completed
|
||||
branches: [main, staging]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' && (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'staging') }}
|
||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||
environment: ${{ github.event.workflow_run.head_branch == 'main' && 'production' || 'staging' }}
|
||||
|
||||
|
|
|
@ -59,12 +59,6 @@ jobs:
|
|||
key: ${{ github.repository }}-turbo-cache
|
||||
path: ./.turbo
|
||||
|
||||
- name: Mount Docker buildkit sticky disk
|
||||
uses: useblacksmith/stickydisk@v1
|
||||
with:
|
||||
key: ${{ github.repository }}-buildkit-cache
|
||||
path: /tmp/.buildkit-cache
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "📦 Installing dependencies with pnpm..."
|
||||
|
@ -99,7 +93,7 @@ jobs:
|
|||
|
||||
# Install production dependencies only
|
||||
cd /tmp/prod-deps
|
||||
pnpm install --frozen-lockfile --prod --ignore-scripts --no-optional
|
||||
pnpm install --frozen-lockfile --prod --no-optional
|
||||
|
||||
# Copy back to workspace
|
||||
cd -
|
||||
|
@ -108,7 +102,7 @@ jobs:
|
|||
cp -r apps/server/dist docker-context/
|
||||
cp apps/server/package.json docker-context/
|
||||
|
||||
- name: Set up Docker Builder with Blacksmith cache
|
||||
- name: Set up Docker Builder
|
||||
uses: useblacksmith/setup-docker-builder@v1
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
|
@ -150,6 +144,7 @@ jobs:
|
|||
build-args: |
|
||||
COMMIT_SHA=${{ steps.meta.outputs.sha_short }}
|
||||
BUILD_DATE=${{ steps.meta.outputs.timestamp }}
|
||||
platforms: linux/amd64
|
||||
|
||||
- name: Output image details
|
||||
run: |
|
||||
|
|
Loading…
Reference in New Issue