Skip to content

Commit

Permalink
ci: use composite checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
karhama committed Dec 15, 2023
1 parent 7d98fef commit a124492
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Checkout the code
uses: actions/checkout@v3
with:
path: ncs/nrf
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

uses: karhama/action-checkout@main
with:
fetch_depth: 0
git_ref: ${{ github.event.pull_request.head.sha }}
west_update_params: '--narrow -o=--depth=1'
- name: cache-pip
uses: actions/cache@v3
with:
Expand All @@ -39,8 +39,6 @@ jobs:
BASE_REF: ${{ github.base_ref }}
working-directory: ncs/nrf
run: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git remote -v
# Ensure there's no merge commits in the PR
[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \
Expand All @@ -49,8 +47,6 @@ jobs:
git rebase origin/${BASE_REF}
# debug
git log --pretty=oneline | head -n 10
west init -l .
west update --narrow -o=--depth=1
- name: Run CODEOWNERS test
id: codeowners
Expand Down

0 comments on commit a124492

Please sign in to comment.