-
Notifications
You must be signed in to change notification settings - Fork 101
ci: Refactor workflows so that they are usable by forks #981
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
Conversation
0436ef4 to
47a7b9f
Compare
b85e586 to
4721ba9
Compare
4721ba9 to
c622923
Compare
c622923 to
37373ef
Compare
5f7d570 to
5d6b2f5
Compare
0f30aa2 to
58d9cfd
Compare
1041c45 to
f9a7942
Compare
| HEAD_REPOSITORY_ID: ${{ github.event.pull_request.head.repo.id }} | ||
| HEAD_BRANCH: ${{ github.head_ref }} | ||
|
|
||
| clean-documentation-preview: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you use this to clean the buckets. Would it be easier to set up a time-based purge like in Azure or CircleCI that delete your preview after a week or so. In this way you don't have to maintain this script?
| - name: Clean documentation preview | ||
| run: rclone --config rclone.configuration purge "${PROVIDER}:${BUCKET}/${PULL_REQUEST_NUMBER}" | ||
| env: | ||
| PROVIDER: scaleway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering now what is the expected cost to store the buckets given a certain activity. It is just to have an idea.
14889c5 to
eaa4282
Compare
|
I haven't had a detailed look 😓 but based on my personal experience with CI (and biases thereof), I would suggest the following for the doc preview rather than maintaining a custom setup:
Of course, do what you think is best for skore and very happy to chat about what you learn if you take another road. Out of curiosity did you draw for inspiration from an existing project for the doc preview? |
| Acquire the PR number and the PR commit HEAD sha, after a "workflow_run" event. | ||
| The "workflow_run" context differs from the "pull_request" context and doesn't contain | ||
| PR basic information. This action intends to provide some missing information in the | ||
| "workflow_run" context, without having to explicitly record them in the workflow that | ||
| triggered the "workflow_run" event. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should express the difference between "workflow_run" and other execution context.
|
|
||
| on: | ||
| pull_request: | ||
| pull_request_target: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may document here that no user code should be executed in this action.
| name: cleanup PR | ||
|
|
||
| on: | ||
| pull_request_target: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should document that no user code should be run in this PR.
|
@thomass-dev do you want to move forward on this PR. I can later help at having a spin on #916 because it looks this one will be a blocker. |
d150c2f to
35857f3
Compare
# Conflicts: # .github/workflows/skore.yml
35857f3 to
0c61a8d
Compare
This PR addresses several issues concerning the CI in PR from forks:
- Refactor workflows so that they are usable in every PR
- assignee can be added to every PR
- coverage comments can be send to every PR
- Add workflow to serve documentation preview and send a comment with
the corresponding link in PR
- Add workflow to clean documentation preview and GH artifacts after
closing a PR
This PR addresses several issues concerning the CI in PR from forks:
Refactor workflows so that they are usable in every PR
Add workflow to serve documentation preview and send a comment with the corresponding link in PR
Add workflow to clean documentation preview and GH artifacts after closing a PR