3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 23:25:43 +01:00

Give every gate and publish container a memory limit and an equal swap limit

This commit is contained in:
2026-11-09 08:56:49 +01:00
committed by Lillem4n
parent 2bf8e37283
commit 384b118f3a
5 changed files with 30 additions and 11 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ if [ -z "$published" ]; then
# npmjs shows the README's tagline, which package.json's description is overwritten with here.
in_image_memory=1g leg "copy the README tagline to the description ($node_image)" in_image "$node_image" node release-tooling/write-description.mjs
leg "publish $name@$version ($node_image)" \
docker run --rm -u "$(id -u):$(id -g)" -e HOME=/tmp -e NPM_TOKEN -v "$PWD:/app" -w /app --entrypoint sh "$node_image" -c \
docker run --rm --memory "$container_memory" --memory-swap "$container_memory" -u "$(id -u):$(id -g)" -e HOME=/tmp -e NPM_TOKEN -v "$PWD:/app" -w /app --entrypoint sh "$node_image" -c \
'printf "//registry.npmjs.org/:_authToken=%s\n" "$NPM_TOKEN" > "$HOME/.npmrc" && npm publish --access public'
fi