diff --git a/.github/workflows/__analyze-ref-input.yml b/.github/workflows/__analyze-ref-input.yml new file mode 100644 index 0000000000..71997984b7 --- /dev/null +++ b/.github/workflows/__analyze-ref-input.yml @@ -0,0 +1,63 @@ +# Warning: This file is generated automatically, and should not be modified. +# Instead, please modify the template in the pr-checks directory and run: +# pip install ruamel.yaml && python3 sync.py +# to regenerate this file. + +name: "PR Check - Analyze: 'ref' and 'sha' from inputs" +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GO111MODULE: auto +on: + push: + branches: + - main + - v1 + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + workflow_dispatch: {} +jobs: + analyze-ref-input: + strategy: + matrix: + version: + - stable-20201028 + - stable-20210319 + - stable-20210809 + - cached + - latest + - nightly-latest + os: + - ubuntu-latest + - macos-latest + - windows-latest + name: "Analyze: 'ref' and 'sha' from inputs" + runs-on: ${{ matrix.os }} + steps: + - name: Check out repository + uses: actions/checkout@v2 + - name: Prepare test + id: prepare-test + uses: ./.github/prepare-test + with: + version: ${{ matrix.version }} + - uses: ./../action/init + with: + tools: ${{ steps.prepare-test.outputs.tools-url }} + languages: cpp,csharp,java,javascript,python + config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ + github.sha }} + - name: Build code + shell: bash + run: ./build.sh + - uses: ./../action/analyze + with: + ref: refs/heads/main + sha: 5e235361806c361d4d3f8859e3c897658025a9a2 + env: + TEST_MODE: true + env: + INTERNAL_CODEQL_ACTION_DEBUG_LOC: true diff --git a/.github/workflows/__ref-commit-input.yml b/.github/workflows/__upload-ref-sha-input.yml similarity index 91% rename from .github/workflows/__ref-commit-input.yml rename to .github/workflows/__upload-ref-sha-input.yml index 8540c51726..72cf3b24d4 100644 --- a/.github/workflows/__ref-commit-input.yml +++ b/.github/workflows/__upload-ref-sha-input.yml @@ -3,7 +3,7 @@ # pip install ruamel.yaml && python3 sync.py # to regenerate this file. -name: PR Check - 'ref' and 'sha' from inputs +name: "PR Check - Upload-sarif: 'ref' and 'sha' from inputs" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GO111MODULE: auto @@ -20,7 +20,7 @@ on: - ready_for_review workflow_dispatch: {} jobs: - ref-commit-input: + upload-ref-sha-input: strategy: matrix: version: @@ -34,7 +34,7 @@ jobs: - ubuntu-latest - macos-latest - windows-latest - name: "'ref' and 'sha' from inputs" + name: "Upload-sarif: 'ref' and 'sha' from inputs" runs-on: ${{ matrix.os }} steps: - name: Check out repository @@ -57,14 +57,13 @@ jobs: with: ref: refs/heads/main sha: 5e235361806c361d4d3f8859e3c897658025a9a2 - category: analyze + upload: false env: TEST_MODE: true - uses: ./../action/upload-sarif with: ref: refs/heads/main sha: 5e235361806c361d4d3f8859e3c897658025a9a2 - category: upload env: TEST_MODE: true env: diff --git a/pr-checks/checks/analyze-ref-input.yml b/pr-checks/checks/analyze-ref-input.yml new file mode 100644 index 0000000000..88714c955e --- /dev/null +++ b/pr-checks/checks/analyze-ref-input.yml @@ -0,0 +1,17 @@ +name: "Analyze: 'ref' and 'sha' from inputs" +description: "Checks that specifying 'ref' and 'sha' as inputs works" +steps: + - uses: ./../action/init + with: + tools: ${{ steps.prepare-test.outputs.tools-url }} + languages: cpp,csharp,java,javascript,python + config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ github.sha }} + - name: Build code + shell: bash + run: ./build.sh + - uses: ./../action/analyze + with: + ref: 'refs/heads/main' + sha: '5e235361806c361d4d3f8859e3c897658025a9a2' + env: + TEST_MODE: true diff --git a/pr-checks/checks/ref-commit-input.yml b/pr-checks/checks/upload-ref-sha-input.yml similarity index 89% rename from pr-checks/checks/ref-commit-input.yml rename to pr-checks/checks/upload-ref-sha-input.yml index ecd3349140..b04ea977ce 100644 --- a/pr-checks/checks/ref-commit-input.yml +++ b/pr-checks/checks/upload-ref-sha-input.yml @@ -1,4 +1,4 @@ -name: "'ref' and 'sha' from inputs" +name: "Upload-sarif: 'ref' and 'sha' from inputs" description: "Checks that specifying 'ref' and 'sha' as inputs works" steps: - uses: ./../action/init @@ -13,13 +13,12 @@ steps: with: ref: 'refs/heads/main' sha: '5e235361806c361d4d3f8859e3c897658025a9a2' - category: 'analyze' + upload: false env: TEST_MODE: true - uses: ./../action/upload-sarif with: ref: 'refs/heads/main' sha: '5e235361806c361d4d3f8859e3c897658025a9a2' - category: 'upload' env: TEST_MODE: true