]> git.feebdaed.xyz Git - 0xmirror/grpc.git/commitdiff
[CI] Add a github workflow for publishing to bcr. (#41027)
authoryuanweiz <weizheyuan@google.com>
Wed, 12 Nov 2025 22:22:47 +0000 (14:22 -0800)
committerGitHub <noreply@github.com>
Wed, 12 Nov 2025 22:22:47 +0000 (14:22 -0800)
Based on https://github.com/bazel-contrib/publish-to-bcr.

---------

Co-authored-by: Sergii Tkachenko <sergiitk@google.com>
.github/workflows/publish-to-bcr.yaml [new file with mode: 0644]

diff --git a/.github/workflows/publish-to-bcr.yaml b/.github/workflows/publish-to-bcr.yaml
new file mode 100644 (file)
index 0000000..1e5aaf2
--- /dev/null
@@ -0,0 +1,33 @@
+# Publish new releases to Bazel Central Registry.
+name: Publish to BCR
+on:
+  # Run the publish workflow after a successful release
+  # Will be triggered from the release.yaml workflow
+  workflow_call:
+    inputs:
+      tag_name:
+        required: true
+        type: string
+
+  # In case of problems, let release engineers retry by manually dispatching
+  # the workflow from the GitHub UI
+  workflow_dispatch:
+    inputs:
+      tag_name:
+        description: "gRPC tag to deploy"
+        required: true
+        type: string
+
+jobs:
+  publish:
+    uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.0.0
+    with:
+      attest: false
+      tag_name: ${{ inputs.tag_name }}
+      # GitHub repository which is a fork of the upstream where the Pull Request will be opened.
+      registry_fork: grpc/bazel-central-registry
+    permissions:
+      contents: write
+    secrets:
+      # Necessary to push to the BCR fork, and to open a pull request against a registry
+      publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}