Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Support reading rust-toolchain file from another directory #110

Open
3 tasks done
alsuren opened this issue Sep 18, 2020 · 1 comment
Open
3 tasks done

Support reading rust-toolchain file from another directory #110

alsuren opened this issue Sep 18, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@alsuren
Copy link

alsuren commented Sep 18, 2020

Do the checklist before filing an issue:

  • Is this related to the actions-rs Actions?
    If you think it's a problem related to Github Actions in general, use GitHub Community forum instead: https://github.community
  • You've read the Contributing section about feature requests: https://github.com/actions-rs/.github/blob/master/CONTRIBUTING.md#feature-requests
  • Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
    • I think we found the bit of the code where you search for rust-toolchain file. Would like some input on naming/semantics of our with option though.

Motivation

Our github actions workflow requires us to have two repos checked out, so we use the checkout action like this:

        uses: actions/checkout@v2
        with:
          path: futurenhs-platform

so we have this work-around to make actions-rs/toolchain pick up our rust-toolchain file:

      - name: Make toolchain version available in current directory
        run: cp futurenhs-platform/rust-toolchain .

in https://github.com/FutureNHS/futurenhs-platform/pull/231/commits/8602258bb2ff07740ddc8522247d86d3fb50b7e4 I have a work-around to copy rust-toolchain from our repo checkout into the current working directory.

Workflow example

      - uses: actions/checkout@v2
        with:
          path: futurenhs-platform
      - name: Make toolchain version available in current directory
        run: cp futurenhs-platform/rust-toolchain .
      - uses: actions-rs/toolchain@v1
        with:
          toolchain-path: futurenhs-platform/rust-toolchain

(or possibly just path: futurenhs-platform?)

we thought about using working-directory: futurenhs-platform but this would have to be in a with block (it can only be top-level for run actions)

@alsuren alsuren added the enhancement New feature or request label Sep 18, 2020
@lukepighetti
Copy link

I am also running into this issue. I have a monorepo and want to put rust-toolchain.toml in each projects folder, but actions-rs/toolchain@v1 doesn't recognize this as a valid location, even if the GitHub Actions working directory is set to the project folder

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants