Skip to content

Commit

Permalink
fix: add target branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehonal authored Mar 28, 2024
1 parent 12d684a commit eb84fe4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/test-better-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ jobs:
uses: Drassil/gh-actions-collection/better-dependabot@master
with:
version_target: 'patch' # Example: target minor version updates
token: ${{ secrets.GITHUB_TOKEN }} # Use a GitHub PAT or `${{ secrets.GITHUB_TOKEN }}`
token: ${{ secrets.GITHUB_TOKEN }} # Use a GitHub PAT or `${{ secrets.GITHUB_TOKEN }}`
target_branch: 'master'
2 changes: 2 additions & 0 deletions better-dependabot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The Better Dependabot GitHub Action automates the process of updating NPM packag
| `version_target` | Determines the version to upgrade to. Options: `latest`, `newest`, `greatest`, `minor`, `patch`, `semver`. | No | `patch` |
| `ncu_args` | Extra arguments for the `npm-check-updates` command. | No | `''` |
| `token` | A GitHub PAT (Personal Access Token) for authenticating GitHub CLI operations. | Yes | N/A |
| `target_branch` | The target branch for the PR | No | `main` |

## Usage

Expand Down Expand Up @@ -48,6 +49,7 @@ jobs:
version_target: 'minor' # Example: target minor version updates
ncu_args: '--filter /react/' # Example: update react packages only
token: ${{ secrets.GITHUB_TOKEN }} # Use a GitHub PAT or `${{ secrets.GITHUB_TOKEN }}`
target_branch: 'main'
```
## Example Workflow
Expand Down
4 changes: 4 additions & 0 deletions better-dependabot/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ inputs:
token:
description: 'A Github PAT'
required: true
target_branch:
description: 'The PR target branch'
default: 'main'
required: false
runs:
using: 'composite'
steps:
Expand Down

0 comments on commit eb84fe4

Please sign in to comment.