Home > Back-end >  Github action badges in private repos in github private pages
Github action badges in private repos in github private pages

Time:12-20

With the advent of Github private pages. I can actually put up my github actions that are run in a private repo. However, the private page can't render the badge which should have access to this private repo.

enter image description here

However, if I click on the image, it takes me to the badge. That's because I'm authenticated in Github and can see everything about the repository. I wonder why the action badge is not showing up.

CodePudding user response:

This is a similar issue than VSCode not able to show the same badge (like your GitHub Page does): see discussion 156091

If the repo is private, you can only view it when logged into GitHub.
I don't think VS Code isn't going to be able to show the badges in this case because we'd also have to send along your GitHub creds when making the request for the badge.

Regarding badges on GitHub pages specifically, there is badges/shields issue 593 requesting support for private github repos

There's two viable options for folks that want to use Shields to get badges for private repos:

  1. Use a self-hosted Shields instance with appropriate GH auth in your configuration.
  2. Use Shields.io and the Endpoint badge with your own custom endpoint that provides the data needed for Shields.io to create and provide the badge.
  • Related