Skip to content

Commit 23803e5

Browse files
authored
Update action.yml
1 parent 8b6bfbb commit 23803e5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

action.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ runs:
88
if test -d /__e && grep -q '^ID=alpine$' /etc/os-release; then
99
apk add --no-cache -- docker-cli libstdc++
1010
docker run --rm --interactive --entrypoint /usr/sbin/chroot --volume /:/hostfs "$(docker inspect "$(hostname)" --format "{{ .Image }}")" /hostfs /bin/bash -eo pipefail -xs "$(hostname)" <<'EOF'
11-
export DOCKER_CONFIG=/home/runner/.docker
12-
docker login
11+
if test -f /home/runner/.docker/config.json; then
12+
export DOCKER_CONFIG=/home/runner/.docker
13+
fi
1314
find "$(docker inspect "$1" --format '{{ range.Mounts }}{{ if eq .Destination "/__e" }}{{ .Source }}{{ end }}{{ end }}')" -type f -executable -name 'node' -not -path '*_alpine/*' -print0 | xargs -0 -n 1 -- /bin/bash -xc 'docker run --rm --volume /:/hostfs "docker.io/library/node:$("$1" -e "console.log(process.versions.node)")-alpine" -e "fs.copyFileSync(process.execPath, process.argv[1])" -- "/hostfs$1"' --
1415
EOF
1516
sed -i -e 's/^ID=alpine$/ID=linux/' /etc/os-release

0 commit comments

Comments
 (0)