GitHub Container Registry uses ghcr.io. The earlier docker.pkg.github.com instructions have been removed.
Inject tokens through secret storage or an equivalent mechanism; do not write them directly into command history.
printf '%s' "$GHCR_TOKEN" | docker login ghcr.io -u "$GHCR_USER" --password-stdin
docker build -t ghcr.io/<OWNER>/<IMAGE>:<TAG> .
docker push ghcr.io/<OWNER>/<IMAGE>:<TAG>
docker logout ghcr.io
Replace OWNER and IMAGE with actual lowercase paths. Deploy verified tags or digests.
Consider GITHUB_TOKEN with the required packages permissions in GitHub Actions. Check package visibility and linked-repository permissions. Verify storage and transfer terms rather than assuming all usage is free.