From 3b1a175eace396f308f791febd1f553b6c6c66e4 Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Fri, 3 Jul 2026 16:39:24 +0000 Subject: [PATCH] fix: install VS Code from Microsoft's direct download endpoint instead of apt repo The apt repo at packages.microsoft.com/repos/vscode does not publish amd64 and arm64 .deb packages atomically, so the arm64 build in CI could pick up an older VS Code version than amd64 when both platforms build in the same run. Switch to downloading the .deb directly from update.code.visualstudio.com/latest/linux-deb-{arch}/stable, the canonical "always latest" endpoint, and resolve dependencies via apt-get install -f. Also add an explicit docker/setup-qemu-action step to the workflow so arm64 emulation is version-pinned rather than relying on the runner's default binfmt registration. --- .github/workflows/main-workflow.yml | 3 +++ Dockerfile | 15 +++++++++------ version.txt | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main-workflow.yml b/.github/workflows/main-workflow.yml index 0929abc..5a11403 100644 --- a/.github/workflows/main-workflow.yml +++ b/.github/workflows/main-workflow.yml @@ -11,6 +11,9 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/Dockerfile b/Dockerfile index 6a89b76..8f0dfa1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,13 +29,16 @@ RUN curl -sL https://aka.ms/DevTunnelCliInstall | bash #Instalando VSCode RUN ARCH="$(dpkg --print-architecture)" \ + && case "${ARCH}" in \ + amd64) VSCODE_ARCH="x64" ;; \ + arm64) VSCODE_ARCH="arm64" ;; \ + *) echo "Unsupported architecture: ${ARCH}" >&2; exit 1 ;; \ + esac \ + && curl -fsSL "https://update.code.visualstudio.com/latest/linux-deb-${VSCODE_ARCH}/stable" -o /tmp/vscode.deb \ + && (sudo dpkg -i /tmp/vscode.deb || true) \ && sudo apt-get update \ - && sudo apt-get install -y gnupg2 \ - && sudo apt-get install -y software-properties-common \ - && sudo wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - \ - && sudo add-apt-repository "deb [arch=${ARCH}] https://packages.microsoft.com/repos/vscode stable main" \ - && sudo apt-get update \ - && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y code + && sudo DEBIAN_FRONTEND=noninteractive apt-get install -f -y \ + && rm -f /tmp/vscode.deb #Making home writable RUN sudo chmod -R a+rwX /home diff --git a/version.txt b/version.txt index 6b6eace..a575350 100755 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.2.23 +3.2.24