summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-10-06 10:34:23 +1100
committerGitHub <noreply@github.com>2023-10-06 10:34:23 +1100
commit127560ae223255d0e081b932e902d2da242abf06 (patch)
tree3a27003918ff1c1eafa94192c2b85c0a903f1af8 /.github
parent92873cc14f1ef66ae3c856dc6b5298c75e66f8d2 (diff)
Add `qmk ci-validate-aliases` (#22205)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/lint.yml25
1 files changed, 2 insertions, 23 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 9862ff502c..19dd7c70a9 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -74,31 +74,10 @@ jobs:
fi
exit $exit_code
- - name: Verify at most one added keyboard
+ - name: Verify keyboard aliases
if: always()
shell: 'bash {0}'
run: |
git reset --hard
git clean -xfd
-
- # Get the keyboard list and count for the target branch
- git checkout -f ${{ github.base_ref }}
- git pull --ff-only
- QMK_KEYBOARDS_BASE=$(qmk list-keyboards)
- QMK_KEYBOARDS_BASE_COUNT=$(qmk list-keyboards | wc -l)
-
- # Get the keyboard list and count for the PR
- git checkout -f ${{ github.head_ref }}
- git merge --no-commit --squash ${{ github.base_ref }}
- QMK_KEYBOARDS_PR=$(qmk list-keyboards)
- QMK_KEYBOARDS_PR_COUNT=$(qmk list-keyboards | wc -l)
-
- echo "::group::Keyboards changes in this PR"
- diff -d -U 0 <(echo "$QMK_KEYBOARDS_BASE") <(echo "$QMK_KEYBOARDS_PR") | grep -vE '^(---|\+\+\+|@@)' | sed -e 's@^-@Removed: @g' -e 's@^+@ Added: @g'
- echo "::endgroup::"
-
- if [[ $QMK_KEYBOARDS_PR_COUNT -gt $(($QMK_KEYBOARDS_BASE_COUNT + 1)) ]]; then
- echo "More than one keyboard added in this PR -- see the PR Checklist."
- echo "::error::More than one keyboard added in this PR -- see the PR Checklist."
- exit 1
- fi
+ qmk ci-validate-aliases