Skip to content

Add OIDC in Docker guide for GitHub Actions deployments#45243

Open
gmondello wants to merge 5 commits into
github:mainfrom
gmondello:add-oidc-in-docker
Open

Add OIDC in Docker guide for GitHub Actions deployments#45243
gmondello wants to merge 5 commits into
github:mainfrom
gmondello:add-oidc-in-docker

Conversation

@gmondello

Copy link
Copy Markdown
Contributor

Summary

Adds a new guide for configuring OpenID Connect between GitHub Actions and Docker Hub, following the same format as existing provider-specific guides (AWS, Azure, GCP, HashiCorp Vault, JFrog, Octopus Deploy, PyPI).

Docker Hub recently shipped OIDC connections that let GitHub Actions workflows authenticate using short-lived tokens instead of long-lived personal access tokens (PATs) or organization access tokens (OATs). This eliminates credential rotation overhead and reduces secret sprawl in CI/CD pipelines.

Changes

  • New file: content/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-docker.md

    • Overview of Docker Hub OIDC connections
    • Prerequisites (Docker Business/Team subscription, org owner/editor role)
    • Step-by-step setup: creating a connection in Docker Hub, configuring rulesets
    • Complete workflow example using docker/oidc-action@v1 and docker/login-action@v4
    • Subject claim matching reference (trigger types, wildcard patterns)
    • Links to Docker documentation
  • Updated file: content/actions/how-tos/secure-your-work/security-harden-deployments/index.md

    • Added /oidc-in-docker to the children list (alphabetical order, between Azure and GCP)

References

Adds a new guide for configuring OpenID Connect between GitHub Actions
and Docker Hub, following the same format as existing provider guides
(AWS, Azure, GCP, JFrog, etc.).

Docker Hub OIDC connections let workflows authenticate using short-lived
tokens instead of long-lived PATs or OATs. The guide covers creating a
connection in Docker Hub, configuring rulesets for claim matching, and
a complete workflow example using docker/oidc-action and docker/login-action.
Copilot AI review requested due to automatic review settings July 21, 2026 21:29
@welcome

welcome Bot commented Jul 21, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Jul 21, 2026
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
actions/how-tos/secure-your-work/security-harden-deployments/index.md fpt
ghec
ghes@ 3.21 3.20 3.19 3.18 3.17
fpt
ghec
ghes@ 3.21 3.20 3.19 3.18 3.17
New file: actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-docker.md fpt
ghec
fpt
ghec

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds guidance for authenticating GitHub Actions workflows with Docker Hub using OIDC.

Changes:

  • Adds Docker Hub OIDC setup, ruleset, and workflow guidance.
  • Adds the guide to the security-hardening navigation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.

File Description
oidc-in-docker.md Adds the Docker Hub OIDC guide and workflow example.
index.md Registers the new guide in navigation.

- Use Liquid variables instead of hardcoded product names
- Add third-party actions disclaimer reusable to workflow example
- Use action-checkout reusable for actions/checkout
- Add note about immutable subject claim format (post July 15 2026)
- Remove duplicate external links per style guide
- Pin version comments to major version only (v1, v4, v6)
OIDC connections scope access to Docker Hub and Docker Build Cloud,
not just Docker Hub. Keep Docker Hub only where specifically referring
to registry operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Do not begin working on this issue until triaged by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants