Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support env-mapping option #11

Merged
merged 1 commit into from
Jul 29, 2024
Merged

feat: support env-mapping option #11

merged 1 commit into from
Jul 29, 2024

Conversation

samypr100
Copy link
Owner

Ideally, we can just specify our dev drive environment variables just once rather than re-declaring them in each step.

Hence a job like this:

- uses: samypr100/setup-dev-drive@v3
- name: Step A
  env:
    CARGO_HOME: ${{ env.DEV_DRIVE }}/.cargo
    RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup
  run: ...
- name: Step B
  env:
    CARGO_HOME: ${{ env.DEV_DRIVE }}/.cargo
    RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup
  run: ...
- name: Step C
  env:
    CARGO_HOME: ${{ env.DEV_DRIVE }}/.cargo
    RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup
  run: ...
# ...

Becomes streamlined into something like this:

- uses: samypr100/setup-dev-drive@v3
  with:
    env-mapping: |
      CARGO_HOME,{{ DEV_DRIVE }}/.cargo
      RUSTUP_HOME,{{ DEV_DRIVE }}/.rustup
- name: Step A
  run: ...
- name: Step B
  run: ...
- name: Step C
  run: ...
# ...

@samypr100 samypr100 self-assigned this Jul 29, 2024
@samypr100 samypr100 marked this pull request as ready for review July 29, 2024 04:26
@samypr100 samypr100 changed the title feat: support env mapping feat: support env-mapping option Jul 29, 2024
@samypr100 samypr100 merged commit fdc9259 into main Jul 29, 2024
37 checks passed
@samypr100 samypr100 deleted the support-env-mapping branch July 29, 2024 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant