File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build Docker Image
2+ on :
3+ push :
4+ branches : [main, master]
5+ paths :
6+ - ' packages/server/**'
7+ pull_request :
8+ branches : [main, master]
9+ paths :
10+ - ' packages/server/**'
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+ - name : Set up Docker Buildx
18+ uses : docker/setup-buildx-action@v3
19+ - name : Build Docker image
20+ uses : docker/build-push-action@v5
21+ with :
22+ context : ./packages/server
23+ file : ./packages/server/dockerfile
24+ push : false
25+ tags : proxyhub-server:latest
26+ cache-from : type=gha
27+ cache-to : type=gha,mode=max
28+ # - name: Upload Docker image as artifact
29+ # uses: actions/upload-artifact@v4
30+ # with:
31+ # name: docker-image
32+ # path: /tmp/_buildx_build
33+ # retention-days: 1
Original file line number Diff line number Diff line change 1+ FROM node:22.16.0-alpine
2+
3+ WORKDIR /app
4+
5+ COPY package*.json ./
6+
7+ RUN npm ci --only=production
8+
9+ RUN npm run build
10+ COPY . .
11+
12+ CMD ["npm", "start"]
You can’t perform that action at this time.
0 commit comments