code_style_check.yaml 686 B

123456789101112131415161718192021222324
  1. name: Code style check
  2. on: [pull_request]
  3. jobs:
  4. build:
  5. runs-on: ubuntu-20.04
  6. steps:
  7. - uses: actions/checkout@v2
  8. with:
  9. fetch-depth: 1000
  10. - name: Set git token
  11. if: endsWith(github.repository, 'enterprise')
  12. run: |
  13. echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
  14. git config --global credential.helper store
  15. - name: Run elvis check
  16. run: |
  17. set -e
  18. if [ -f EMQX_ENTERPRISE ]; then
  19. ./scripts/elvis-check.sh $GITHUB_BASE_REF emqx-enterprise
  20. else
  21. ./scripts/elvis-check.sh $GITHUB_BASE_REF emqx
  22. fi