diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0158389..faa835ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,22 +118,19 @@ jobs: apt-get -o Acquire::Retries=10 -qq update apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends cargo if: startsWith(matrix.container, 'ubuntu') || startsWith(matrix.container, 'debian') - - name: Install requirements (fedora/almalinux) + - name: Install requirements (fedora/almalinux/centos) run: | set -euxo pipefail - dnf=dnf - if ! type -P dnf &>/dev/null; then - dnf=microdnf + if type -P dnf &>/dev/null; then + dnf install -y cargo + elif type -P microdnf &>/dev/null; then + # tar and gzip are required for actions/checkout on *-minimal images + microdnf install -y cargo tar gzip + else + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable + echo "$HOME/.cargo/bin" >>"${GITHUB_PATH}" fi - # tar and gzip are required for actions/checkout on almalinux:*-minimal - $dnf install -y cargo tar gzip - if: startsWith(matrix.container, 'fedora') || startsWith(matrix.container, 'almalinux') - - name: Install requirements (centos) - run: | - set -euxo pipefail - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable - echo "$HOME/.cargo/bin" >>"${GITHUB_PATH}" - if: startsWith(matrix.container, 'centos') + if: startsWith(matrix.container, 'fedora') || startsWith(matrix.container, 'almalinux') || startsWith(matrix.container, 'centos') - name: Install requirements (alpine) run: | set -eux