What Is GITHUB_REPOSITORY?
GITHUB_REPOSITORY is the owner/repo identifier of the repository running the workflow.
GITHUB_REPOSITORY is handy for building image names, calling the GitHub API, or constructing URLs that reference the current repo.
Common uses
- Name a container image:
ghcr.io/$GITHUB_REPOSITORY - Build API URLs
- Split owner and repo with parameter expansion
Example
Push to the GitHub Container Registry path for this repo.
shell
docker push ghcr.io/${GITHUB_REPOSITORY}:latestKey takeaways
- GITHUB_REPOSITORY is
owner/repo. - Great for image names and API URLs.
- GITHUB_REPOSITORY_OWNER gives just the owner.
Related guides
What Is GITHUB_REPOSITORY_OWNER?GITHUB_REPOSITORY_OWNER is the user or organization that owns the repo in a GitHub Actions run. Learn how it…
What Is GHCR? GitHub Container Registry ExplainedGHCR is GitHub Container Registry, hosting images under ghcr.io tied to GitHub identities. Learn how auth, pe…