Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Using `${{ github.head_ref || github.ref_name }} ` for branch spec seems to work best for all modes, eg `on: push` and `on: pull_request`. 

Also need GH token set in env
  • Loading branch information
joemiller authored Apr 12, 2023
1 parent 7f36163 commit 56f539d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ jobs:
with:
commit_message: "🤖 fmt"
repo: ${{ github.repository }}
branch: ${{ github.head_ref }}
branch: ${{ github.head_ref || github.ref_name }}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
```
> NOTE: These examples may not show the latest version. Check the [GitHub Releases](https://github.com/planetscale/ghcommit-action/releases) page to see the latest version tag
Expand All @@ -59,8 +61,10 @@ Example showing all options:
with:
commit_message: "🤖 fmt"
repo: ${{ github.repository }}
branch: ${{ github.head_ref }}
branch: ${{ github.head_ref || github.ref_name }}
file_pattern: '*.txt *.md *.json *.hcl'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
```
See [`action.yaml`](./action.yaml) for current list of supported inputs.
Expand Down

0 comments on commit 56f539d

Please sign in to comment.