From bf9109d587d2b0923d5ba2d18649d57e8e6473b4 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Wed, 10 Jul 2024 10:46:07 +0100 Subject: [PATCH] CI: Workadoun by adding docker env variable for deprecated PXT docker image. --- .github/workflows/makecode.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/makecode.yml b/.github/workflows/makecode.yml index 7ba4d90c..ed66bd5d 100644 --- a/.github/workflows/makecode.yml +++ b/.github/workflows/makecode.yml @@ -85,6 +85,15 @@ jobs: f.write(json.dumps(pxt_target, indent=4)) EOF git diff pxtarget.json + # https://docs.docker.com/engine/deprecated/#pushing-and-pulling-with-image-manifest-v2-schema-1 + # https://stackoverflow.com/a/51357915/775259 + - name: Workaround for issue with PXT docker image type being deprecated + run: + mkdir -p /etc/systemd/system/docker.service.d + echo "[Service]" > /etc/systemd/system/docker.service.d/docker-service-override.conf + echo 'Environment="DOCKER_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1"' >> /etc/systemd/system/docker.service.d/docker-service-override.conf + sudo systemctl daemon-reload + sudo systemctl restart docker - name: Build MakeCode targets # Because pxt runs docker with "--user build" it doesn't have write access to some mounted files, # so we need to force all files created by the pxt cli to have write/execute rights for everyone