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

Allow setting of install folder using env var #29

Open
daniddelrio opened this issue Oct 25, 2024 · 5 comments
Open

Allow setting of install folder using env var #29

daniddelrio opened this issue Oct 25, 2024 · 5 comments

Comments

@daniddelrio
Copy link

Is it possible to allow users of this action to set the install directory themselves, maybe using an env var like SPARK_INSTALL_DIR? This way, we also have control over where to set the SPARK_HOME.

We have our own cache directory in our runners so we would like to set it there 🙂

@daniddelrio
Copy link
Author

@vemonet can you take a look?

@vemonet
Copy link
Owner

vemonet commented Oct 30, 2024

@daniddelrio I have added an input param to define the install folder (where the SPARK_HOME folder will be downloaded and unzipped)

- uses: vemonet/setup-spark@v1
  with:
    spark-version: '3.5.3'
    install-folder: '/home/runner/work'

cf. https://github.com/vemonet/setup-spark/blob/main/src/setup-spark.ts

@daniddelrio
Copy link
Author

@vemonet perfect, thank you! So just to confirm, setup-spark@v1 will already have the install-folder input when I reference it from my workflows?

@daniddelrio
Copy link
Author

daniddelrio commented Oct 31, 2024

Will it be possible to pass it as an env var as well rather than an install-folder input? This would make it easier for our setup as we have multiple workflows that reference this and we can simply set a global env var for all of our runners

@vemonet
Copy link
Owner

vemonet commented Oct 31, 2024

Yes it is available on v1 directly

Otherwise you could use the $GITHUB_WORKSPACE env variable (we try to use the parent of this folder, if not writable we directly use this folder): https://github.com/vemonet/setup-spark/blob/main/src/setup-spark.ts#L22

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

No branches or pull requests

2 participants