From 4738db547b82f302104b219458883c09f74679f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= Date: Mon, 10 Jul 2023 22:59:39 +0200 Subject: [PATCH] Do not rely on missing /etc/os-release file in CI workflow --- .github/workflows/oxipng.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/oxipng.yml b/.github/workflows/oxipng.yml index 11ce3312..3954b001 100644 --- a/.github/workflows/oxipng.yml +++ b/.github/workflows/oxipng.yml @@ -27,16 +27,16 @@ jobs: include: - target: x86_64-unknown-linux-gnu - os: ubuntu-latest + os: ubuntu-22.04 target-apt-arch: amd64 - target: x86_64-unknown-linux-musl - os: ubuntu-latest + os: ubuntu-22.04 target-apt-arch: amd64 - target: aarch64-unknown-linux-gnu - os: ubuntu-latest + os: ubuntu-22.04 target-apt-arch: arm64 - target: aarch64-unknown-linux-musl - os: ubuntu-latest + os: ubuntu-22.04 target-apt-arch: arm64 - target: x86_64-pc-windows-msvc os: windows-latest @@ -57,12 +57,11 @@ jobs: - name: Set up Ubuntu multiarch if: startsWith(matrix.os, 'ubuntu') && matrix.target-apt-arch != 'amd64' run: | - . /etc/os-release - + readonly DISTRO_CODENAME=jammy sudo dpkg --add-architecture "${{ matrix.target-apt-arch }}" sudo sed -i "s/^deb http/deb [arch=$(dpkg-architecture -q DEB_HOST_ARCH)] http/" /etc/apt/sources.list for suite in '' '-updates' '-backports' '-security'; do - echo "deb [arch=${{ matrix.target-apt-arch }}] http://ports.ubuntu.com/ $DISTRIB_CODENAME$suite main universe multiverse" | \ + echo "deb [arch=${{ matrix.target-apt-arch }}] http://ports.ubuntu.com/ $DISTRO_CODENAME$suite main universe multiverse" | \ sudo tee -a /etc/apt/sources.list >/dev/null done