-
Notifications
You must be signed in to change notification settings - Fork 12
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
Auto-generation of setup.py #25
Conversation
8f1f1d2
to
045b853
Compare
git config --local user.name "RenkuBot" | ||
git add setup.py | ||
git commit -m 'chore: automatically generate setup.py' || true | ||
git push origin ${{ github.head_ref }} |
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 believe this isn't going to work because of branch protection - the best you can do is push to a branch and automatically open a PR that could be automatically approved and merged. To do that, you need a token that is not the default token injected by github actions because those by design cannot trigger new actions.
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 look at this workflow in the main renku repo as an example.
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've created a token with under my account which will create PRs with my name. Do we have a RenkuBot token to use here?
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.
Wouldn't it be better for the action to run on each branch and update the setup.py as a commit on that branch, if needed. Similar to how we create the Pipfile.lock
in renku-python
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.
Right, so run on the PR branch rather than master
? That would certainly be easier
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 thought of it in the beginning but I don't like to have a commit added to my PR/branches automatically.
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 remove the explicit ref (since it's a default) but if it needs to be there for some reason feel free to leave it in.
Generate
setup.py
on merges tomaster
that changepoetry.lock
orpyproject.toml
.Fixes #15