From 3905b1613396d66450bbe0150c6e43e0f4aa6247 Mon Sep 17 00:00:00 2001 From: Bob Callaway Date: Mon, 16 Dec 2024 09:22:08 -0500 Subject: [PATCH] use sudo tee to write daemon.json Signed-off-by: Bob Callaway --- actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/setup/action.yml b/actions/setup/action.yml index 289224181..fe53c847c 100644 --- a/actions/setup/action.yml +++ b/actions/setup/action.yml @@ -84,7 +84,7 @@ runs: # Configure DockerHub mirror tmp=$(mktemp) if [ ! -f /etc/docker/daemon.json ]; then - echo '{}' > /etc/docker/daemon.json + echo '{}' | sudo tee /etc/docker/daemon.json fi jq '."registry-mirrors" = ["https://mirror.gcr.io"]' /etc/docker/daemon.json > "$tmp" sudo mv "$tmp" /etc/docker/daemon.json