diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d30e9b3755..cce0db4038 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,13 +1,18 @@ name: CodeQL on: - push: - branches: - - master - pull_request: - # The branches below must be a subset of the branches above - branches: - - master +# push: +# branches: +# - master +# pull_request: +# # The branches below must be a subset of the branches above +# branches: +# - master + workflow_dispatch: + inputs: + ref: + description: 'Ref to build (for Pull Requests, use refs/pull/NNN/head)' + required: true jobs: analyze: @@ -20,8 +25,15 @@ jobs: steps: - name: Checkout + if: github.event_name != 'workflow_dispatch' uses: actions/checkout@v3 + - name: Checkout (Manual) + if: github.event_name == 'workflow_dispatch' + uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.ref }} + - name: Install dependencies run: | echo "::group::Update apt"