-
Notifications
You must be signed in to change notification settings - Fork 663
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 workflow for updating torch-mlir #14952
Conversation
@ScottTodd don't review yet, I dont have a way of testing syntax figured out locally so I'm using github |
4928960
to
6af80d0
Compare
Ok, seems safe to try it now. Afaik there is no way to test this without merging it and running it. |
update torch-mlir version | ||
committer: Roll torch-mlir <[email protected]>> | ||
title: "[roll torch-mlir] update torch-mlir" | ||
token: ${{ secrets.WRITE_ACCESS_TOKEN }} |
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.
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.
In this situation, it will approve it but doesn't someone still have to come and merge it after seeing if checks pass?
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.
So I guess in that case someone is saved the few seconds of approving before merging?
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 think this line also enables the auto-merge on the PR, so once the bot approves it (and the tests passed), the PR will be auto-merged
Not sure if peter-evans/create-pull-request offers the same option
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 silly. Thanks. I'll just switch to using the gh cli like the one there
on: | ||
schedule: | ||
- cron: '0 13 * * *' | ||
workflow_dispatch: |
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 can temporarily add pull_request:
here to test workflow until the creating PR step, which might be still helpful
3125159
to
7424269
Compare
7424269
to
c67343a
Compare
am I doing something wrong with the GH_TOKEN? |
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.
Ok, seems safe to try it now. Afaik there is no way to test this without merging it and running it.
You can test on your fork. Some of the commit author and token details will be a little different, but the rest should all be the same.
@@ -0,0 +1,65 @@ | |||
name: Roll PyTorch |
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 isn't clear to me from this PR and the code what exactly this is trying to do. Can you add PR description and maybe a comment in the file?
- Is this creating pull requests that trigger CI jobs?
- Is it committing directly to
main
? - How are commits selected?
initial_sha="$(git rev-parse --short HEAD)" | ||
echo "$initial_sha" | ||
git fetch --tags origin | ||
git checkout origin/main | ||
new_sha="$(git rev-parse --short HEAD)" | ||
echo "$new_sha" | ||
if [ "$initial_sha" == "$new_sha" ]; then | ||
echo "No updates made" | ||
else | ||
echo "SHA changed, updating submodule" |
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.
If this logic gets any more complicated, it should be extracted into a script that can be run locally by developers (for debugging and manual updates), then the workflow should run the script. Any committing and PR creation details should still go in the workflow file.
@dan-garvey please close if stale |
Superceded by #17236 |
No description provided.