O Que É GITHUB_REPOSITORY?
GITHUB_REPOSITORY é o identificador owner/repo do repositório que executa o workflow.
GITHUB_REPOSITORY é útil para construir nomes de imagens, chamar a API do GitHub ou montar URLs que referenciam o repo atual.
Usos comuns
- Nomear uma imagem de container:
ghcr.io/$GITHUB_REPOSITORY - Construir URLs de API
- Separar owner e repo com expansão de parâmetros
Exemplo
Faça push para o caminho do GitHub Container Registry deste repo.
shell
docker push ghcr.io/${GITHUB_REPOSITORY}:latestPrincipais conclusões
- GITHUB_REPOSITORY é
owner/repo. - Ótimo para nomes de imagens e URLs de API.
- GITHUB_REPOSITORY_OWNER fornece apenas o owner.
Guias relacionados
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…