vrcauthproxy/docs/BADGE_SETUP.md

1.6 KiB

Setting Up GitHub Badges

This document explains how to set up the GitHub Secrets required for the test status badge functionality.

Steps to Create a GitHub Gist for Badge Storage

  1. Create a new public GitHub Gist at https://gist.github.com/

    • Add a file named vrcauthproxy-tests.json with the following content:
    {
      "schemaVersion": 1,
      "label": "tests",
      "message": "unknown",
      "color": "lightgrey"
    }
    
    • Save the Gist
  2. Note the Gist ID from the URL

    • The URL will look like: https://gist.github.com/YOUR_USERNAME/GIST_ID
    • Copy the GIST_ID part

Creating GitHub Secrets

  1. In your VRCAuthProxy repository, go to Settings > Secrets and variables > Actions

  2. Create the following secrets:

    • GIST_ID

      • Value: The Gist ID you copied in step 2 above
    • GIST_SECRET

      • Value: A GitHub Personal Access Token (PAT) with gist scope
      • To create a PAT, go to your GitHub account Settings > Developer settings > Personal access tokens > Tokens (classic)
      • Generate a new token with at least the gist scope
      • Copy the token value (you won't be able to see it again after leaving the page)
  3. Update the README.md badge URL

    • Replace USER_PLACEHOLDER with your GitHub username
    • Replace GIST_ID_PLACEHOLDER with your Gist ID

Testing the Setup

After setting up the secrets and updating the README.md, push a commit to the main branch to trigger the workflow that will update the badge status.

If everything is set up correctly, the badge in the README should display the current test status (passing or failing).