diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 063d0a0543b..91d121d1104 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -87,6 +87,25 @@ jobs: with: fetch-depth: 0 + #- name: Print debug output + # env: + # GITHUB_CONTEXT: ${{ toJson(github) }} + # run: | + # echo "$GITHUB_SHA" + # echo "$GITHUB_REF" + # echo "$GITHUB_HEAD_REF" + # echo "$GITHUB_BASE_REF" + # git log "$GITHUB_BASE_REF".. + # bin/commitlint "$GITHUB_BASE_REF".. + + - name: Check commit messages + env: + BEFORE: ${{ github.event.push.before }} + # for a PR this will be: origin/master..origin/$GITHUB_HEAD_REF + # for a push it will be: $BEFORE.. + run: | + bin/commitlint ${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} + # things to be cached/restored: - name: Cache stack global package db diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 29f25453503..f3fad92f409 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -57,6 +57,12 @@ jobs: with: fetch-depth: 0 + - name: Check commit messages + # for a PR this will be: master..origin/$GITHUB_HEAD_REF + # for a push it will be: master.. + run: | + bin/commitlint origin/master..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} + # things to be cached/restored: - name: Cache stack global package db diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 50802f66432..509d789cf9a 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -50,6 +50,12 @@ jobs: with: fetch-depth: 0 + - name: Check commit messages + # for a PR this will be: master..origin/$GITHUB_HEAD_REF + # for a push it will be: master.. + run: | + bin/commitlint origin/master..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} + # things to be cached/restored: - name: Cache stack global package db diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index fdbe7c2789c..5d6e4c3ae0a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -47,6 +47,12 @@ jobs: with: fetch-depth: 0 + - name: Check commit messages + # for a PR this will be: master..origin/$GITHUB_HEAD_REF + # for a push it will be: master.. + run: | + bin/commitlint origin/master..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} + # things to be cached/restored: - name: Cache stack global package db