diff --git a/.github/workflows/pragmaonce.yml b/.github/workflows/pragmaonce.yml new file mode 100644 index 0000000000000..9a6221379853e --- /dev/null +++ b/.github/workflows/pragmaonce.yml @@ -0,0 +1,18 @@ +name: pragma-once checker + +on: [pull_request_target] + +jobs: + build: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + persist-credentials: false + + - name: Run pragma check + id: pragma_check + run: | + git grep -l '#pragma once' -- '*.h' && exit 1