File tree Expand file tree Collapse file tree 5 files changed +43
-7
lines changed
Expand file tree Collapse file tree 5 files changed +43
-7
lines changed Original file line number Diff line number Diff line change 3434
3535 - name : Check for .npmrc
3636 run : |
37+ pwd
38+ echo "---"
39+ ls -la | grep -E "^\\.|npmrc" || echo "No .npmrc found"
40+ echo "---"
41+ pwd_val=$PWD
3742 if [ -f .npmrc ]; then
3843 echo "HAS_NPMRC=true" >> $GITHUB_ENV
44+ echo "Full path: ${pwd_val}/.npmrc"
3945 echo "Using .npmrc:" && ls -l .npmrc && echo "---" && sed 's/_authToken=.*/_authToken=***REDACTED***/' .npmrc
4046 else
4147 echo "HAS_NPMRC=false" >> $GITHUB_ENV
6369
6470 - name : ' BFF: Build and push ${{ env.PACKAGE_NAME }} (with .npmrc)'
6571 if : ${{ env.HAS_NPMRC == 'true' }}
66- uses : docker/build-push-action@v4
72+ uses : docker/build-push-action@v6
6773 with :
6874 context : .
6975 file : ${{ matrix.package }}/Dockerfile
@@ -72,12 +78,14 @@ jobs:
7278 labels : ${{ steps.image_meta.outputs.labels }}
7379 builder : ${{ steps.setup-buildx.outputs.name }}
7480 platforms : linux/amd64
81+ cache-from : type=gha
82+ cache-to : type=gha,mode=max
7583 secret-files : |
76- id=npmrc,src=${{ github.workspace }}/ .npmrc
84+ id=npmrc,src=.npmrc
7785
7886 - name : ' BFF: Build and push ${{ env.PACKAGE_NAME }} (no .npmrc)'
7987 if : ${{ env.HAS_NPMRC != 'true' }}
80- uses : docker/build-push-action@v4
88+ uses : docker/build-push-action@v6
8189 with :
8290 context : .
8391 file : ${{ matrix.package }}/Dockerfile
Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ RUN chown -R api:api .
2222# You can remove this install step if you build with `--bundle` option.
2323# The bundled output will include external dependencies.
2424RUN --mount=type=secret,id=npmrc,target=/root/.npmrc,required=false \
25- sh -eu -c 'ls -l /root/.npmrc || echo "/root/.npmrc not present"; yarn --cwd api --omit=dev -f install'
25+ sh -eu -c '
26+ if [ -f /root/.npmrc ]; then
27+ echo "Using .npmrc:" && cat /root/.npmrc | sed "s/_authToken=.*/_authToken=***REDACTED***/"
28+ else
29+ echo ".npmrc not present - building without GitHub Packages auth"
30+ fi
31+ yarn --cwd api --omit=dev -f install
32+ '
2633
2734CMD [ "node" , "api" ]
Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ RUN chown -R notification-producer:notification-producer .
2121# You can remove this install step if you build with `--bundle` option.
2222# The bundled output will include external dependencies.
2323RUN --mount=type=secret,id=npmrc,target=/root/.npmrc,required=false \
24- sh -eu -c 'ls -l /root/.npmrc || echo "/root/.npmrc not present"; yarn --cwd notification-producer install --production --force'
24+ sh -eu -c '
25+ if [ -f /root/.npmrc ]; then
26+ echo "Using .npmrc:" && cat /root/.npmrc | sed "s/_authToken=.*/_authToken=***REDACTED***/"
27+ else
28+ echo ".npmrc not present - building without GitHub Packages auth"
29+ fi
30+ yarn --cwd notification-producer install --production --force
31+ '
2532
2633CMD [ "node" , "notification-producer" ]
Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ RUN chown -R telegram:telegram .
2121# You can remove this install step if you build with `--bundle` option.
2222# The bundled output will include external dependencies.
2323RUN --mount=type=secret,id=npmrc,target=/root/.npmrc,required=false \
24- sh -eu -c 'ls -l /root/.npmrc || echo "/root/.npmrc not present"; yarn --cwd telegram install --production --force'
24+ sh -eu -c '
25+ if [ -f /root/.npmrc ]; then
26+ echo "Using .npmrc:" && cat /root/.npmrc | sed "s/_authToken=.*/_authToken=***REDACTED***/"
27+ else
28+ echo ".npmrc not present - building without GitHub Packages auth"
29+ fi
30+ yarn --cwd telegram install --production --force
31+ '
2532
2633CMD [ "node" , "telegram" ]
Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ RUN chown -R twap:twap .
2121# You can remove this install step if you build with `--bundle` option.
2222# The bundled output will include external dependencies.
2323RUN --mount=type=secret,id=npmrc,target=/root/.npmrc,required=false \
24- sh -eu -c 'ls -l /root/.npmrc || echo "/root/.npmrc not present"; yarn --cwd twap --omit=dev -f install'
24+ sh -eu -c '
25+ if [ -f /root/.npmrc ]; then
26+ echo "Using .npmrc:" && cat /root/.npmrc | sed "s/_authToken=.*/_authToken=***REDACTED***/"
27+ else
28+ echo ".npmrc not present - building without GitHub Packages auth"
29+ fi
30+ yarn --cwd twap --omit=dev -f install
31+ '
2532
2633CMD [ "node" , "twap" ]
You can’t perform that action at this time.
0 commit comments