Push images to Vercel Container Registry from GitHub Actions
You can now push container images from GitHub Actions to Vercel Container Registry using GitHub OIDC authentication, eliminating the need for long-lived registry credentials. The vercel/vcr-action/login action exchanges your workflow's OIDC token for a short-lived Vercel access token that is automatically revoked when the job ends.
You can now push container images from GitHub Actions to (VCR) without storing long-lived registry credentials.Vercel Container Registry
The new action authenticates your workflow using GitHub OIDC. It exchanges the workflow’s OIDC token for a short-lived Vercel access token, then uses that token to log in to . When the job ends, the action logs out and revokes the Vercel token.vercel/vcr-action/loginvcr.vercel.com
To start:
Then add the login step before you build and push and the image:
The action authenticates Docker by default. Pass to use Podman or Buildah instead.engines
After VCR finishes preparing a image, you can use it as a custom . Within the same project, reference it as .linux/amd64<repository>:<tag>Vercel Sandbox image
Learn more in the and the .VCR documentationGitHub Actions guide
Create an on your Vercel team that matches the GitHub repository and workflow, and grants read-write access to VCR.OIDC policy
Store your Vercel team ID as a GitHub repo variable, for example , along with the team slug, project slug, and repo name used in the image tag.
VERCEL_TEAM_IDGive the workflow or job permission.
id-token: write
Source: original entry ↗