From 2f6cd157e0bb27b34812b9e2d6807ec490c729e8 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 5 Sep 2023 23:14:31 +0900 Subject: [PATCH] Simplify CI config --- .github/workflows/ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faa835ee..3b54e34a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,15 +121,12 @@ jobs: - name: Install requirements (fedora/almalinux/centos) run: | set -euxo pipefail - if type -P dnf &>/dev/null; then - dnf install -y cargo - elif type -P microdnf &>/dev/null; then + if ! type -P dnf &>/dev/null && 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}" + microdnf install -y tar gzip fi + 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, 'fedora') || startsWith(matrix.container, 'almalinux') || startsWith(matrix.container, 'centos') - name: Install requirements (alpine) run: |