-
Notifications
You must be signed in to change notification settings - Fork 5
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
Provide a live preview for contributions done from fork repo #686
Comments
Investigations done in week 2024-04-17Work done with @benjaminParisel All tests have been done in the https://github.com/process-analytics/github-actions-playground/ repository with a fake site. Experiment a solution with 2 steps as described in https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
This custom implementation has been tested in a PR created from a fork repo, see process-analytics/github-actions-playground#349. It has also been tested with PR created from the target repository, see process-analytics/github-actions-playground#350. We have checked that the teardown could be managed in a specific workflow like in process-analytics/github-actions-playground#351 A contribution has been proposed to the official surge-preview action afc163/surge-preview#294 which is based on our experiment. Next stepsTo have a fully working solution
|
* Allow to get the PR number even if this action is called from a wokflow_run event Covers bonitasoft/bonita-documentation-site#686 --------- Co-authored-by: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com>
This was not working as the 2 workflow used to deployed called the same reusable workflow that deployed to the same URL for the 2 environments. This was because the URL is computed using the job id of the reusable workflow. So for "test" deployment, duplicate the logic of the reusable workflow to have a dedicated URL. In the "deploy" reusable workflow, use a shorter job id. It is used to compute the URL of all deployments. A shorter name ensure that we don't try to generate a too large URL subdomain. The PR comment relative to the changes will be managed by a dedicated workflow in the future for a better separation of concerns, to simplify the maintenance and to make things more explicit. So remove the related steps (that was still a work in progress) from the reusable workflow in charge of the deployment. Covers #686
Use a reusable workflow to comment a PR separately then deploy a preview workflow. - This provides a better separation of concerns. - It also allows direct use of the existing custom action to be executed in a `pull_request` event context. - This will require managing an additional workflow in all content repositories, which will increase maintenance a little, but using a “reusable workflow” will limit the cost (mainly the cost at installation time). - It will be called in workflows triggered by the `pull_request_target` event (there is no build but only a check of files modified by the PR). Covers #686
Use the reusable workflow defined in bonita-documentation-site to configure and maintain them more easily. Covers bonitasoft/bonita-documentation-site#686 Covers bonitasoft/bonita-documentation-site#700
Use the reusable workflow defined in bonita-documentation-site to configure and maintain them more easily. Covers bonitasoft/bonita-documentation-site#686 Covers bonitasoft/bonita-documentation-site#700
Use the reusable workflow defined in bonita-documentation-site to configure and maintain them more easily. Covers bonitasoft/bonita-documentation-site#686 Covers bonitasoft/bonita-documentation-site#700
Use the reusable workflow defined in bonita-documentation-site to configure and maintain them more easily. Covers bonitasoft/bonita-documentation-site#686 Covers bonitasoft/bonita-documentation-site#700
All tasks are completed, so closing |
Use the reusable workflow defined in bonita-documentation-site to configure and maintain them more easily. Covers bonitasoft/bonita-documentation-site#686 Covers bonitasoft/bonita-documentation-site#700
ℹ️ Part of a top-level initiative: #670
Currently, the preview is built and only attached as an artifact of the GH Actions run. It is not deployed to surge, so there is no live environment available.
Be also aware of #402.
Current limitations
Resources
Possible solutions
Investigations
See #686 (comment). It also includes next steps.
The text was updated successfully, but these errors were encountered: