From d09b3b0385058da6e89ccf750007223b983e7af5 Mon Sep 17 00:00:00 2001 From: roomrys Date: Wed, 4 Sep 2024 20:40:22 -0700 Subject: [PATCH] Use different conditional syntax for windows runner --- .github/workflows/build_conda_ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_conda_ci.yml b/.github/workflows/build_conda_ci.yml index d6e2fd868..5bc3d7515 100644 --- a/.github/workflows/build_conda_ci.yml +++ b/.github/workflows/build_conda_ci.yml @@ -143,10 +143,18 @@ jobs: # TODO(LM): change to == "true" id: set-run-id run: | - if [ "${{ env.RUN_BUILD_JOB }}" == "false" ]; then - echo "::set-output name=RUN_ID::${{ github.run_id }}" + if [[ "$RUNNER_OS" == "Windows" ]]; then + if ($env:RUN_BUILD_JOB -eq "false") { + echo "::set-output name=RUN_ID::$env:GITHUB_RUN_ID" + } else { + echo "::set-output name=RUN_ID::$env:RUN_ID" + } else - echo "::set-output name=RUN_ID::${{ env.RUN_ID }}" + if [ "${{ env.RUN_BUILD_JOB }}" == "false" ]; then + echo "::set-output name=RUN_ID::${{ github.run_id }}" + else + echo "::set-output name=RUN_ID::${{ env.RUN_ID }}" + fi fi # https://github.com/actions/download-artifact?tab=readme-ov-file#usage