commitlint-github-action
commitlint-github-action copied to clipboard
Only my first push is succeeding.
I may be using this incorrectly, but I am only able to get my first push to succeed.
- Commit with a valid commit message and all works as expected and push succeeds.
- Commit again with a valid commit message and the push is rejected.
Error:
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/chore/12.
remote: error: Required status check "commitlint" is expected.
To github.com:name/repo.git
! [remote rejected] chore/12 -> chore/12 (protected branch hook declined)
error: failed to push some refs to 'github.com:name/repo.git'
commitlint.yml:
name: Lint Commit Messages
on: [pull_request, push]
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
with:
failOnWarnings: true
I have a branch pattern to run the workflow:
I can confirm it works on the first push, but fails with the error above on subsequent pushes. First push:
Am I doing something wrong here?