I'm getting closer...the full ref of the branch is available in the environment as GITHUB_REF . I can't figure out how to use this in install_github. I've tried
remotes::install_github("akoyabio/phenoptr", ref="${{ env.GITHUB_REF }}")
which gave me an empty string, and
remotes::install_github("akoyabio/phenoptr", ref="${GITHUB_REF}")
remotes::install_github("akoyabio/phenoptr", ref="$GITHUB_REF")
which inserted the literal strings $%7BGITHUB_REF%7D and $GITHUB_REF
remotes::install_github("akoyabio/phenoptr", ref="${{GITHUB_REF}}")
gives an error: Unrecognized named-value: 'GITHUB_REF'. Located at position 1 within expression: GITHUB_REF
The GitHub Actions docs don't have a clear example of referencing a built-in environment variable and the examples I find from searching are inconsistent.