-
Notifications
You must be signed in to change notification settings - Fork 7
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
Make CI run checkout PR for backlogger_preview #42
Conversation
40b3e52
to
ee84bca
Compare
|
3faf854
to
f7dc564
Compare
action.yaml
Outdated
@@ -29,17 +29,13 @@ inputs: | |||
runs: | |||
using: composite | |||
steps: | |||
- uses: actions/checkout@v4 |
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.
Note that this action is not a workflow like the ones under .github/workflows
. It provides an action that can be used from other repositories' workflows.
It needs to do a checkout into a different directory.
I don't know right now how to solve the problem, but this won't work.
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 would guess ref: ${{ github.event.pull_request.head.sha }}
is needed here. Unfortunately GitHub docs don't seem to explain this case?
Someone on stackoverflow suggests github.event.workflow_run.head_sha
would work without giving an explanation. And maybe fetch-depth: 2
is needed?
I'm thinking out loud here since that's what I had to look up myself
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.
seems to work now but not sure how affects https://github.com/os-autoinst/qa-tools-backlog-assistant/blob/master/.github/workflows/backlog_checker.yml#L21
940835e
to
59a4dd9
Compare
77cda36
to
5466e29
Compare
5466e29
to
9a8e468
Compare
I wonder if this can work because the main purpose of the action is to run on the main branch, so there is no |
i found it hard to run it from my repository. CI fails. |
9c5e0f2
to
983af2f
Compare
Switch trigger to pull_request_target and adjust the checkout actions to run against the latest code in the PR. Although it works for backlogger, it might impact when the workflow run in another repository. https://progress.opensuse.org/issues/158236 Signed-off-by: ybonatakis <[email protected]>
c6a92d5
to
3b1dcde
Compare
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 see "TEST" on https://opensuse.github.io/backlogger/pr-preview/pr-42/ so I guess this works :)
3b1dcde
to
83751c8
Compare
it does but i need to understand the |
28d06ec
to
553f555
Compare
testing it with @kalikiana we verified it works. we think to merge and see how it will go |
Signed-off-by: ybonatakis <[email protected]>
553f555
to
39d9d36
Compare
I checked with Yannis that the TEST change works, and this should address the review remarks
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.
For reference, this is what it looked like with the TEST change, and after undoing https://github.com/openSUSE/backlogger/compare/3b1dcdee76c956d502539fae68d0528da7a1dc3d..83751c86485e6bfb8dd2b6748ab12add7288e22d which didn't work. I mention it since the proof is a moving 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.
Well, something here is fishy. The preview did not change after the TEST change got removed.
Switch trigger to pull_request_target and adjust the checkout actions
to run against the latest code in the PR.
Although it works for backlogger, it might impact when the workflow
run in another repository.
https://progress.opensuse.org/issues/158236