Skip to content

Commit

Permalink
fix(#234): setting empty github-token to use Deploy Key (#235)
Browse files Browse the repository at this point in the history
Fixes: #234
  • Loading branch information
TriPSs committed Sep 25, 2023
2 parents 8118086 + 16957fa commit abfc1da
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,19 @@ Github releases

Use a deploy key

If you want to trigger another GitHub action based on pushed tag, you can use Deploy Key,
To make full use of the Deploy Key, you must set the value of github-token input to empty string.

```yaml
- name: Checkout GitHub Action
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.SSH_DEPLOY_KEY }}
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v3
uses: TriPSs/conventional-changelog-action@v4
with:
github-token: ""
```

## Development
Expand Down
5 changes: 4 additions & 1 deletion src/helpers/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ module.exports = new (class Git {
const githubToken = core.getInput('github-token')

// Make the Github token secret
core.setSecret(githubToken)
if(githubToken) {
core.setSecret(githubToken)
}


// if the env is dont-use-git then we mock exec as we are testing a workflow
if (ENV === 'dont-use-git') {
Expand Down

0 comments on commit abfc1da

Please sign in to comment.