-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add a new input argument pr_number
to support trigger types other than pull_request
?
#101
Comments
Closing as duplicate of #6 This is something that's necessary in order to do lots of things like enable previews for forks from the Long story short, you'll be able to do this action once I implement #6, but I don't know when that will be. In the meantime, your best bet is probably to look through the action.yml file here and take what you need to set up previews yourself. There's not a lot going on behind the scenes really - copy the files in the source dir to the target dir on the target branch, commit, work out where that Pages URL will be and then leave a comment. You'll probably be able to do that much more simply than this action does. Downside is that you'll have to be super careful about untrusted input. Off the top of my head, I know that workflows on the |
Thanks, @rossjrw, for pointers! I searched the issue tracker prior to filing this but I did not bother to search the open PRs, nor did I make a connection of my ask to enabling forks 🙂 The CI in our repo is guarded by a maintainer-initiated command (due to scarce self-hosted runner resources), so arbitrary PRs cannot be executed in the CI without approval. Also,
we've experienced that workflow files cannot be modified by a GHA, which is actually annoying because then we could not easily backport a PR using GHA if the PR touches workflow files (NVIDIA/cuda-python#365). These security settings become an obstacle to our use cases 🥲 Anyway, I agree that some steps can be copied/pasted from here. But it's just easier to use your action as-is if it's ready, because for enterprise use cases copy-pastas of 3rd-party repos require additional legal approvals which is not fun and the process can be tedious. For now I'll just rewrite the key steps myself. |
Hi! Thank you for creating this nice action. We'd like to use it in our repo, but our project has a delicate CI so that using a standalone workflow to trigger this action following the instruction
is not suitable for our CI. Instead, we'd like to call this action as part of our doc build workflow, which in turn is a reusable workflow launched as part of the main CI. But it means our doc build workflow has
and therefore the pr-preview-action cannot get the current PR number.
My suggestion is instead of looking it up for users based on the
pull_request
trigger, we allow a new input argument for users to overwrite this behavior (and this can be looked up in any workflow from thegithub
context, I think):Is this feasible? Thanks!
The text was updated successfully, but these errors were encountered: