File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,14 +53,12 @@ jobs:
5353 else
5454 echo "tags=avoylenko/wwebjs-api:${{ github.ref_name }},avoylenko/wwebjs-api:latest" >> $GITHUB_OUTPUT
5555 fi
56- - name : Install edge version of whatsapp-web.js
57- if : github.ref_name == 'edge'
58- run : |
59- npm install --save-exact github:pedroslopez/whatsapp-web.js#main
6056 - name : Build and push with dynamic tag
6157 uses : docker/build-push-action@v5
6258 with :
6359 platforms : linux/amd64,linux/arm64,linux/arm/v7
6460 push : true
6561 tags : ${{ steps.meta.outputs.tags }}
62+ build-args : |
63+ USE_EDGE=${{ github.ref_name == 'edge' }}
6664 no-cache : ${{ github.ref_name == 'edge' }}
Original file line number Diff line number Diff line change @@ -9,9 +9,15 @@ WORKDIR /usr/src/app
99
1010FROM base AS deps
1111
12+ ARG USE_EDGE=false
13+
1214COPY package*.json ./
1315
14- RUN npm ci --only=production --ignore-scripts
16+ RUN if [ "$USE_EDGE" = "true" ]; then \
17+ npm install --save-exact --omit=dev --ignore-scripts github:pedroslopez/whatsapp-web.js#main; \
18+ else \
19+ npm ci --only=production --ignore-scripts; \
20+ fi
1521
1622# Create the final stage
1723FROM base
You can’t perform that action at this time.
0 commit comments