r-hub / rhub

R-hub API client
https://r-hub.github.io/rhub/
Other
353 stars 51 forks source link

quarto installation missing `gh` #638

Open gravesti opened 1 month ago

gravesti commented 1 month ago

It seems that gh is not available in some (?) containers but it is used for installing quarto. I tried with c23 and valgrind platforms.

https://github.com/Causal-LDA/TrialEmulation/actions/runs/10682492103/job/29608471849

if [ Linux != "Windows" ]; then
    # On Windows scoop will be used so no need to download the release
    if [ "release" == "release" ]; then
      # download the latest stable release
      gh release download --repo github.com/quarto-dev/quarto-cli --pattern *linux-amd64.deb
      version=$(curl https://quarto.org/docs/download/_download.json | jq -r '.version')
      echo "version=${version}" >> $GITHUB_OUTPUT
    elif [ "release" == "LATEST" -o "release" == "pre-release" ]; then
      # get latest pre release version 
      version=$(curl https://quarto.org/docs/download/_prerelease.json | jq -r '.version')
      wget https://github.com/quarto-dev/quarto-cli/releases/download/v$version/quarto-$version-linux-amd64.deb
      echo "version=${version}" >> $GITHUB_OUTPUT
    else
      # download a specific release
      wget https://github.com/quarto-dev/quarto-cli/releases/download/vrelease/quarto-release-linux-amd64.deb
      echo "version=release" >> $GITHUB_OUTPUT
    fi
    echo "installer=$(ls quarto*linux-amd64.deb)" >> $GITHUB_OUTPUT
  else
    : # do nothing for now (https://github.com/quarto-dev/quarto-actions/issues/59 :facepalm:)
    # FIXME: how to get version information from scoop in windows runners?
    # send the cderv bat-signal!
  fi
  shell: bash --noprofile --norc -e -o pipefail {0}
  env:
    R_LIBS_USER: /github/home/R/x86_64-pc-linux-gnu-library/4.5
    R_LIB_FOR_PAK: /opt/R/devel-valgrind/lib/R/site-library
    BUNDLE_EXT: linux-amd64.deb
    R_KEEP_PKG_SOURCE: yes
    GITHUB_TOKEN: ***

/__w/_temp/6a84bcb5-9b51-41ac-b153-93796a96b25f.sh: line 5: gh: command not found
Error: Process completed with exit code 127.