chore: use publish to bcr reusable workflow for bcr mirroring#3775
chore: use publish to bcr reusable workflow for bcr mirroring#3775kormide wants to merge 2 commits intobazelbuild:mainfrom
Conversation
| fixedReleaser: | ||
| login: scentini | ||
| email: 11149636+scentini@users.noreply.github.com |
There was a problem hiding this comment.
A fixed releaser is no longer required with the workflow because the identity of the publish token is now the actor who opens the PR on the BCR.
bf77d17 to
72bb93c
Compare
|
@krasimirgg @scentini as Googlers, can you provide the access token? |
|
Updated the instructions in the PR description to recommend creating a machine user for bazelbuild and using that user to generate a classic PAT. We do this for bazel-contrib and aspect-build and have associated bot users like https://github.com/bazel-contrib-bot. |
|
We already have the token set up at the org level. rules_cc is using it https://github.com/bazelbuild/rules_cc/blob/01a1eced1d61670e3fe1310ccaaa45635aaf90b1/.github/workflows/publish.yaml#L35 |
.github/workflows/publish.yaml
Outdated
| # Tags don't include a "v" prefix | ||
| tag_prefix: "" | ||
| # GitHub repository which is a fork of the upstream where the Pull Request will be opened. | ||
| registry_fork: scentini/bazel-central-registry |
| description: Override the ref to read .bcr templates from | ||
| jobs: | ||
| publish: | ||
| uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.1.0 |
There was a problem hiding this comment.
Use the latest version here?
There was a problem hiding this comment.
v1.1.0 is the latest version
72bb93c to
7f2aa93
Compare
7f2aa93 to
1f83fab
Compare
Co-authored-by: UebelAndre <github@uebelandre.com>
Migrate rules_rust off of the deprecated Publish to BCR GitHub app to the newer reusable workflow. The reusable workflow has a number of benefits over the app:
Some actions that maintainer for this ruleset will need to take:
BCR_PUBLISH_TOKENfor the repository or org (see steps). I recommend creating a "machine" user for bazelbuild and generating a classic PAT for that user rather than using an individual's PAT. For example, in bazel-contrib we use the bazel-contrib-bot user to do publishes.