name: Code style check on: [pull_request] jobs: build: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 with: fetch-depth: 1000 - name: Set git token if: endsWith(github.repository, 'enterprise') run: | echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials git config --global credential.helper store - name: Run elvis check run: | set -e if [ -f EMQX_ENTERPRISE ]; then ./scripts/elvis-check.sh $GITHUB_BASE_REF emqx-enterprise else ./scripts/elvis-check.sh $GITHUB_BASE_REF emqx fi