diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 91d121d1104e..69c36a962bf3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -87,10 +87,12 @@ jobs: with: fetch-depth: 0 - #- name: Print debug output + # - name: Print debug output # env: # GITHUB_CONTEXT: ${{ toJson(github) }} # run: | + # echo + # echo "$GITHUB_SHA" # echo "$GITHUB_REF" # echo "$GITHUB_HEAD_REF" @@ -100,10 +102,13 @@ jobs: - name: Check commit messages env: - BEFORE: ${{ github.event.push.before }} + BEFORE: ${{ github.event.before }} # for a PR this will be: origin/master..origin/$GITHUB_HEAD_REF # for a push it will be: $BEFORE.. run: | + echo A"$BEFORE"B + echo C"${BEFORE}"D + echo E"${BEFORE:-origin/master}"F bin/commitlint ${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} # things to be cached/restored: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 509d789cf9a8..67a87647a39d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -50,11 +50,29 @@ jobs: with: fetch-depth: 0 + # - name: Print debug output + # env: + # GITHUB_CONTEXT: ${{ toJson(github) }} + # run: | + # echo + + # 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.before }} # 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} + echo A"$BEFORE"B + echo C"${BEFORE}"D + echo E"${BEFORE:-origin/master}"F + bin/commitlint ${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} # things to be cached/restored: