store-git-credential-github-action
v1.6.6
Published
This action saves the GitHub credentials to the specified keychain.
Downloads
4
Readme
store-git-credential-github-action
This action saves the GitHub credentials to the specified keychain. The GitHub credentials are deleted at the end of the workflow.
Requirement
You will need to install git-credential-manager-core
Installation
See Installation
brew tap microsoft/git
brew install --cask git-credential-manager-core
brew upgrade git-credential-manager-core
Usage
Simple usage
# Use default login.keychain-db
- uses: store-git-credential-github-action
with:
github-username: ${{ secrets.GIT_CREDENTIAL_USERNAME }}
github-password: ${{ secrets.GIT_CREDENTIAL_PASSWORD }}
Custom keychain usage
# Creating a temporary keychain
- uses: akiojin/[email protected]
id: setup-temporary-keychain
- uses: store-git-credential-github-action
with:
github-username: ${{ secrets.GIT_CREDENTIAL_USERNAME }}
github-password: ${{ secrets.GIT_CREDENTIAL_PASSWORD }}
keychain: ${{ steps.setup-temporary-keychain.outputs.keychain }}
keychain-password: ${{ steps.setup-temporary-keychain.outputs.keychain-password }}
Additional Arguments
See action.yml for more details.
|Name|Required|Type|Default|Description|
|:--|:--|:--|:--|:--|
|github-username
|true
|boolean
||GitHub username.|
|github-password
|true
|boolean
||A personal access token with access to the GitHub repository.|
|keychain
|false
|string
|Default keychain|Path of the keychain to use. If omitted, the default login keychain is used.|
|keychain-password
|false
|string
|""|Password for the keychain if specified in the keychain parameter; default login keychain password if the kerchain parameter is omitted.|
GitHub personal access tokens can be obtained at Settings > Developer settings > Personal access tokens
.
Access rights require repo
permissions.
License
Any contributions made under this project will be governed by the MIT License.