Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.01 KB

README.md

File metadata and controls

31 lines (22 loc) · 1.01 KB

Github Auth action

This action uses a GitHub OAuth2 token to resolve private repository urls without putting secrets in local files.

In all aspects this action is heavily inspired by timshadel/heroku-buildpack-github-netrc and The Vanilla DevOps Git Credentials & Private Packages Cheatsheet.

Requirements

You can create your secret by going to settings -> secrets and then adding GH_AUTH_TOKEN with the Oauth2 token (personal access token).

Example usage

uses: onomondo/[email protected]
with:
  github-auth-token: ${{ secrets.GH_AUTH_TOKEN }}

Caveats

If you're using actions/checkout@v2 or higher you need to do one of the following:

  • Set token: ${{ secrets.GH_AUTH_TOKEN }}
  • Set persist-credentials: false
uses: actions/[email protected]
with:
  token: ${{ secrets.GH_AUTH_TOKEN }}
  # or
  persist-credentials: false