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

ci: make workflows better work for PR created from forked repo #54

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Apr 18, 2024

"contribution checks"
The workflow now runs on pull_request_target events.
There are no security issues here. Checks are made only on the updated PR file without doing any tool installation, cache update or branch check. Only the GitHub API is used.
Using this event allows you to create a PR comment when the PR is created from a forked repository.

"build preview" and "references validation" workflows.
The content of the branch of the fork is now correctly used. Previously, the branch of the fork wasn't found by Antora, so the content of the generated site was empty.

Notes

Covers bonitasoft/bonita-documentation-site#402
Covers bonitasoft/bonita-documentation-site#685

"contribution checks"
The workflow now runs on `pull_request_target` events.
There is no security issue here. The checks are done only on the updated file of the PR without
doing tool installation, cache update or branch checkout. Only the GitHub API is used.
Using this event lets create a PR comment when the PR is created from a forked repository.

"build preview" and "references validation" workflows.
The content of the branch of the fork is now correctly used. Previously, the branch of the fork
wasn't found by Antora, so the content of the generated site was empty.
@benjaminParisel benjaminParisel merged commit 912f9b4 into master Apr 18, 2024
4 checks passed
@benjaminParisel benjaminParisel deleted the ci/wf_better_work_pr_from_fork branch April 18, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants