change: a change #401
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compliance | |
on: pull_request | |
jobs: | |
compliance_job: | |
runs-on: ubuntu-latest | |
name: Run compliance checks on patch series (PR) | |
steps: | |
- name: Update PATH for west | |
run: | | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
with: | |
path: ncs/nrf | |
#ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Run merge commits test | |
env: | |
BASE_REF: ${{ github.base_ref }} | |
BASE_REV: ${{ github.event.pull_request.base.sha }} | |
HEAD_REV: ${{ github.event.pull_request.head.sha }} | |
working-directory: ncs/nrf | |
run: | | |
git remote -v | |
# Ensure there's no merge commits in the PR | |
#[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \ | |
#(echo "::error ::Merge commits not allowed, rebase instead";false) | |
#git rebase origin/${BASE_REF} | |
# debug | |
echo "base.sha: ${BASE_REV}" | |
echo "head.sha: ${HEAD_REV}" | |
echo "Git log:" | |
git log --pretty=oneline | head -n 10 |