You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for reusable workflows in trusted publishing
This change addresses issue #4294 by adding optional fields to specify
a different repository for the workflow source when using GitHub Actions
reusable workflows.
When a repository calls a reusable workflow from a different repository,
the OIDC token's `job_workflow_ref` claim points to the reusable workflow's
location, not the caller's workflow. Previously, RubyGems trusted publishing
only supported workflows defined in the same repository as the caller.
Security: Still validates caller repository against repository_owner/name,
preventing unauthorized repositories from publishing via shared workflows
Example configuration for a gem using a shared release workflow:
- repository_owner: "my-org" (the gem's repo
- repository_name: my-gem
- workflow_filename: shared-release.yml
- workflow_repository_owner: shared-org (the shared workflow's repo)
- workflow_repository_name: shared-workflows
workflow_repository_name: Workflow Repository Name
94
96
oidc/pending_trusted_publisher:
95
97
rubygem_name: RubyGem name
96
98
errors:
@@ -971,6 +973,12 @@ en:
971
973
The name of the <a href="https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment">GitHub Actions environment</a> that the above workflow uses for publishing.<br>
972
974
This should be configured under the repository's settings.<br>
973
975
While not required, a dedicated publishing environment is strongly encouraged, especially if your repository has maintainers with commit access who shouldn't have RubyGems.org gem push access.
976
+
workflow_repository_owner_help_html: |
977
+
<strong>For <a href="https://docs.github.com/en/actions/sharing-automations/reusing-workflows">reusable workflows</a> only:</strong> The GitHub organization or username that owns the repository containing the reusable workflow file.<br>
978
+
Leave blank if the workflow is defined in the same repository as above (the common case).
979
+
workflow_repository_name_help_html: |
980
+
<strong>For <a href="https://docs.github.com/en/actions/sharing-automations/reusing-workflows">reusable workflows</a> only:</strong> The name of the repository containing the reusable workflow file.<br>
981
+
Leave blank if the workflow is defined in the same repository as above (the common case).
974
982
pending:
975
983
rubygem_name_help_html: "The gem (on RubyGems.org) that will be created when this publisher is used"
0 commit comments