fix: make CI on PRs only run if not in draft mode #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: [master] | |
paths: | |
- '.github/workflows/ci.yaml' | |
pull_request: | |
branches: [master] | |
types: | |
- opened | |
- synchronize | |
- ready_for_review | |
paths-ignore: | |
- '.github/**' | |
- 'CITATION.cff' | |
- 'CODE_OF_CONDUCT.md' | |
- 'CONTRIBUTING.org' | |
- 'COPYING' | |
- 'README.org' | |
- 'SECURITY.md' | |
schedule: | |
- cron: '0 9 * * 1' | |
jobs: | |
ci: | |
permissions: | |
security-events: write | |
strategy: | |
matrix: | |
build-type: [Debug, Release] | |
fail-fast: false | |
runs-on: ubuntu-latest | |
if: ${{ !github.event.pull_request.draft }} | |
steps: | |
- name: checkout-repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: install-dependencies | |
run: sudo apt-get install -y libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev | |
- name: setup-codeql | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: c-cpp | |
config: | | |
paths-ignore: [vendor] | |
- name: configure | |
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} | |
- name: build | |
run: cmake --build build | |
- name: analyze | |
uses: github/codeql-action/analyze@v3 |