diff --git a/.github/workflows/rhub.yaml b/.github/workflows/rhub.yaml index 884a5fac..a31e7f8f 100644 --- a/.github/workflows/rhub.yaml +++ b/.github/workflows/rhub.yaml @@ -51,18 +51,14 @@ jobs: image: ${{ matrix.config.container }} steps: - - name: Install sudo (Linux) - if: runner.os == 'Linux' + - name: Check distribution + run: echo "::set-output name=distribution::$(awk -F= '/^ID=/{print $2}' /etc/os-release)" + id: check_distribution + - name: Run step only on Fedora + if: ${{ steps.check_distribution.outputs.distribution != 'fedora' }} run: | - . /etc/os-release - echo $ID - if [ "$ID" = "fedora" ]; then - yum install sudo - fi - if command -v apt-get &> /dev/null - then - apt-get install sudo - fi + echo steps.check_distribution.outputs.distribution + apt-get install sudo - uses: r-lib/actions/setup-pandoc@v2 - uses: r-hub/rhub2/actions/rhub-checkout@v1 - uses: r-hub/rhub2/actions/rhub-platform-info@v1