-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use PAT named PULUMI_PROVIDER_AUTOMATION_TOKEN
#1128
base: master
Are you sure you want to change the base?
Conversation
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.
Looks good at first glance. Will take this for a test drive before merging.
I remember taking a crack at this earlier, and hitting permission issues with publishing. If you can get it to work, then by all means merge it. |
@iwahbe the upgrade workflows aren't publishing anything. The publishing in the release workflow is already working with |
0eaa172
to
d786602
Compare
I've set up the xyz provider to work for testing upgrade provider. I've temporarily merged these changes into main to be able to test the upgrade bridge and provider workflows: Edit: The changes for the provider upgrade were lost because the xyz provider didn't have the workflow enabled when this PR was opened. It appears that the PR build is not running automatically. I think this is because GitHub actions disables auto-building for changes pushed by GitHub actions to avoid infinite loops. We need to investigate how to enable these builds. |
From the docs:
The recommendation on this docs page is to use a PAT when pushing PRs which should trigger a workflow. Perhaps as an in-between we should use the BOT token when creating the pull request, if it's available, but fall back to the built-in token for third parties who haven't set this up yet. Alternatively, we might be able to use a |
The I think we might just have to gate the step for the creation of the PR on the PAT being set up. We could allow a less pulumi-bot specific secret name to be used instead. If third parties don't want to configure the PAT, then their only other option is to periodically run the upgrade job locally. |
UPGRADE_PROVIDER_TOKEN
provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/upgrade-provider.yml
Outdated
Show resolved
Hide resolved
d2a9176
to
a13e572
Compare
@danielrbradley @t0yv0 @iwahbe linking back to Daniel's comment here: #1128 (comment) I would like to settle on the name of the PAT token so I can test this upfront using a Pulumiverse provider. Since I don't have admin access anymore on Pulumiverse, I have to ask approval to the Pulumiverse GH org admins when using a fine-grained PAT. Here are my suggestions:
I personally don't mind a longer name if it explains better what it is for. |
|
UPGRADE_PROVIDER_TOKEN
PULUMI_PROVIDER_AUTOMATION_TOKEN
The token needs to have repository scoped permissions to: - **Read** access to actions, commit statuses, metadata, and secrets - **Read** and **Write** access to code, issues, pull requests, and workflows
a13e572
to
1b11bec
Compare
Folks I'm summoned to review but I don't have a good handle on what's going on here. NO objection from me if it keeps working for the Pulumi providers builds 🙏 |
To make the
upgrade-bridge
andupgrade-provider
workflows usable for thirdparty packages, the use ofPULUMI_BOT_TOKEN
is replaced by thegenerateda PAT namedGITHUB_TOKEN
PULUMI_PROVIDER_AUTOMATION_TOKEN
(see discussion below).A
permissions
block is added to allow it to push commits, create Github issues and pull requests in the repository.Contributes to: #1087