diff --git a/.github/workflows/r_package.yml b/.github/workflows/r_package.yml index 7d3a58f169a3..ee73b379e59f 100644 --- a/.github/workflows/r_package.yml +++ b/.github/workflows/r_package.yml @@ -138,13 +138,13 @@ jobs: - name: Install pandoc uses: r-lib/actions/setup-pandoc@v1 - name: Setup and run tests on Linux and macOS - if: startsWith(matrix.os, 'macOS') || matrix.os == 'ubuntu-latest' + if: matrix.os == 'macOS-latest' || matrix.os == 'ubuntu-latest' shell: bash run: | export TASK="${{ matrix.task }}" export COMPILER="${{ matrix.compiler }}" export GITHUB_ACTIONS="true" - if [[ $(echo "${{ matrix.os }}" | head -c5) == "macOS" ]]; then + if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then export OS_NAME="macos" elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then export OS_NAME="linux"