diff --git a/.github/workflows/commitlint.yaml b/.github/workflows/commitlint.yaml index d04a69d29..353d810e5 100644 --- a/.github/workflows/commitlint.yaml +++ b/.github/workflows/commitlint.yaml @@ -11,5 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: commitlint - run: CONTAINER_CMD=docker make containerized-test TARGET=commitlint + # yamllint disable-line rule:line-length + run: make containerized-test CONTAINER_CMD=docker TARGET=commitlint GIT_SINCE="origin/${GITHUB_BASE_REF}" diff --git a/Makefile b/Makefile index b1bbb12aa..1b89d2662 100644 --- a/Makefile +++ b/Makefile @@ -148,7 +148,7 @@ commitlint: REBASE ?= 0 commitlint: git fetch -v $(shell cut -d/ -f1 <<< "$(GIT_SINCE)") $(shell cut -d/ -f2- <<< "$(GIT_SINCE)") @test $(REBASE) -eq 0 || git -c user.name=commitlint -c user.email=commitline@localhost rebase FETCH_HEAD - commitlint --from FETCH_HEAD + commitlint --verbose --from $(GIT_SINCE) .PHONY: cephcsi cephcsi: check-env