Skip to content

Commit

Permalink
docs: bump suggested actions/checkout version to 3
Browse files Browse the repository at this point in the history
  • Loading branch information
tranzystorekk authored and oknozor committed Oct 31, 2022
1 parent 8088ae1 commit dcd3132
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,35 @@ jobs:
runs-on: ubuntu-latest
name: check conventional commit compliance
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Conventional commit check
uses: cocogitto/cocogitto-action@v3
```
If you are running your workflow `on: [pull_request]`,
additional setup for `actions/checkout` is needed to checkout the right commit:

```yaml
on: [pull_request]
jobs:
cog_check_job:
runs-on: ubuntu-latest
name: check conventional commit compliance
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# pick the pr HEAD instead of the merge commit
ref: ${{ github.event.pull_request.head.sha }}
- name: Conventional commit check
uses: cocogitto/cocogitto-action@v3
```

If you are familiar with cocogitto this will run `cog check` and nothing else.

## Check commits since latest tag
Expand Down

0 comments on commit dcd3132

Please sign in to comment.