-
Notifications
You must be signed in to change notification settings - Fork 1.6k
✨ scaffold(v4): add Alpha Update workflow to scaffold #5011
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
✨ scaffold(v4): add Alpha Update workflow to scaffold #5011
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vitorfloriano The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @vitorfloriano. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
pkg/plugins/golang/v4/scaffolds/internal/templates/github/alpha-update.go
Outdated
Show resolved
Hide resolved
--squash \ | ||
--preserve-path .github/workflows \ | ||
--open-gh-issue | ||
` |
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.
Just give a space / empty line at the end to fix the symbol
And is missing run make install
and make generate
to have all samples/docs re-generated within
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.
And is missing run make install and make generate to have all samples/docs re-generated within
Doesn't alpha update
already do that?
INFO Preparing Merge branch and performing merge branch_name=tmp-merge-15-08-25-11-41
...
INFO Running make manifests command=make manifests
...
...
INFO Running make generate command=make generate
...
...
INFO Running make fmt command=make fmt
...
...
INFO Running make vet command=make vet
...
...
INFO Running make lint-fix command=make lint-fix
kubebuilder alpha update \ | ||
--force \ | ||
--squash \ | ||
--preserve-path .github/workflows \ |
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.
The PR is created now manually; we need the URL for it.
Due this, could we remove from the default the --preserve-path
?
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.
GitHub Token does not have permission to alter the workflows directory by any means and it will fail to push the branch if we remove --preserve-path .github/workflows
.
It's not only necessary for the PR. That's why I suggested we implement it internally, since it's mandatory for us.
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.
But if we create the URL for the PR without gh
AND then we create the PR is valid?
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 first need to push the branch. If we are not able to push, we can't construct the URL.
With GITHUB_TOKEN
, we can't push the branch if it has changes in the .github/workflows
directory.
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.
Also, we can't add workflows: write
permisson to the workflow because that's not valid syntax. I've tried that.
We can only give permission to change workflows when we are creating a PAT or GitHub App.
See the available permissions for GITHUB_TOKEN
: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#defining-access-for-the-github_token-scopes
This PR adds the Alpha Update workflow to the
.github/workflows
directory on the initial project scaffold.The workflow:
kubebuilder alpha update
commandThe template: