File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 - run : npm run build
4646 - run : ./utils/docker/build.sh --${{ matrix.docker_arch }} ${{ matrix.docker_tag }} playwright:localbuild
4747 shell : bash
48- - run : ./utils/docker/test_check_layers.sh
49- shell : bash
48+ # The scan looks at the content of the files, in all layers of the image.
49+ - name : Scan the image for secrets
50+ uses : aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
51+ with :
52+ image-ref : playwright:localbuild
53+ scanners : secret
54+ exit-code : ' 1'
55+ # The secret scan needs no vulnerability database.
56+ cache : ' false'
5057 - name : Launch container
5158 run : |
5259 docker run \
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ ARG PLAYWRIGHT_VERSION
1010# npm writes its cache and logs here during the build. /dev/shm is a tmpfs,
1111# so no image layer keeps them. The image itself uses the default ~/.npm.
1212ARG npm_config_cache=/dev/shm/npm
13+ # npm turns on the Node.js compile cache, which writes to /tmp. Turn it off during the build.
14+ ARG NODE_DISABLE_COMPILE_CACHE=1
1315
1416ENV LANG=C.UTF-8
1517ENV LC_ALL=C.UTF-8
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ ARG PLAYWRIGHT_VERSION
1010# npm writes its cache and logs here during the build. /dev/shm is a tmpfs,
1111# so no image layer keeps them. The image itself uses the default ~/.npm.
1212ARG npm_config_cache=/dev/shm/npm
13+ # npm turns on the Node.js compile cache, which writes to /tmp. Turn it off during the build.
14+ ARG NODE_DISABLE_COMPILE_CACHE=1
1315
1416ENV LANG=C.UTF-8
1517ENV LC_ALL=C.UTF-8
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ ARG PLAYWRIGHT_VERSION
1010# npm writes its cache and logs here during the build. /dev/shm is a tmpfs,
1111# so no image layer keeps them. The image itself uses the default ~/.npm.
1212ARG npm_config_cache=/dev/shm/npm
13+ # npm turns on the Node.js compile cache, which writes to /tmp. Turn it off during the build.
14+ ARG NODE_DISABLE_COMPILE_CACHE=1
1315
1416ENV LANG=C.UTF-8
1517ENV LC_ALL=C.UTF-8
Original file line number Diff line number Diff line change @@ -60,8 +60,6 @@ for ((attempt = 1; attempt <= MAX_ATTEMPTS; attempt++)); do
6060 --build-arg PLAYWRIGHT_VERSION=" ${PLAYWRIGHT_VERSION} " \
6161 " ${SECRET_ARGS[@]} " \
6262 -t " $3 " -f " Dockerfile.$2 " . ; then
63- # A failure of this check is not transient, so it does not retry the build.
64- node ./check_layers.js " $3 "
6563 exit 0
6664 fi
6765 if (( attempt < MAX_ATTEMPTS )) ; then
Load diff This file was deleted.
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments