From 6779c667f62c0f17cd1730152a47a61a38dc43c9 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 12 Feb 2024 04:59:53 -0500 Subject: [PATCH] Limit xl runner jobs to github org --- .github/workflows/compile-queries.yml | 1 + .github/workflows/csharp-qltest.yml | 1 + .github/workflows/go-tests-other-os.yml | 1 + .github/workflows/go-tests.yml | 1 + .github/workflows/ql-for-ql-build.yml | 1 + .github/workflows/ruby-build.yml | 1 + .github/workflows/ruby-qltest.yml | 1 + .github/workflows/swift.yml | 8 ++++++-- 8 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile-queries.yml b/.github/workflows/compile-queries.yml index c44aa56a7530..bc8a9f8666d6 100644 --- a/.github/workflows/compile-queries.yml +++ b/.github/workflows/compile-queries.yml @@ -10,6 +10,7 @@ on: jobs: compile-queries: + if: github.repository_owner == 'github' runs-on: ubuntu-latest-xl steps: diff --git a/.github/workflows/csharp-qltest.yml b/.github/workflows/csharp-qltest.yml index f9e1db3f4c7f..cc9520de0e25 100644 --- a/.github/workflows/csharp-qltest.yml +++ b/.github/workflows/csharp-qltest.yml @@ -46,6 +46,7 @@ jobs: xargs codeql execute upgrades testdb diff -q testdb/semmlecode.csharp.dbscheme downgrades/initial/semmlecode.csharp.dbscheme qltest: + if: github.repository_owner == 'github' runs-on: ubuntu-latest-xl strategy: fail-fast: false diff --git a/.github/workflows/go-tests-other-os.yml b/.github/workflows/go-tests-other-os.yml index 8b0395fad906..9c489d38600a 100644 --- a/.github/workflows/go-tests-other-os.yml +++ b/.github/workflows/go-tests-other-os.yml @@ -46,6 +46,7 @@ jobs: make test cache="${{ steps.query-cache.outputs.cache-dir }}" test-win: + if: github.repository_owner == 'github' name: Test Windows runs-on: windows-latest-xl steps: diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 9d518ac70b65..9a6b2bde7d70 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -19,6 +19,7 @@ env: GO_VERSION: '~1.21.0' jobs: test-linux: + if: github.repository_owner == 'github' name: Test Linux (Ubuntu) runs-on: ubuntu-latest-xl steps: diff --git a/.github/workflows/ql-for-ql-build.yml b/.github/workflows/ql-for-ql-build.yml index e8ac1fa0f173..c5d237fc0d3d 100644 --- a/.github/workflows/ql-for-ql-build.yml +++ b/.github/workflows/ql-for-ql-build.yml @@ -11,6 +11,7 @@ env: jobs: analyze: + if: github.repository_owner == 'github' runs-on: ubuntu-latest-xl steps: ### Build the queries ### diff --git a/.github/workflows/ruby-build.yml b/.github/workflows/ruby-build.yml index 392c6ff83026..617346470699 100644 --- a/.github/workflows/ruby-build.yml +++ b/.github/workflows/ruby-build.yml @@ -111,6 +111,7 @@ jobs: ruby/extractor/target/release/codeql-extractor-ruby.exe retention-days: 1 compile-queries: + if: github.repository_owner == 'github' runs-on: ubuntu-latest-xl steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ruby-qltest.yml b/.github/workflows/ruby-qltest.yml index 19d5325091fd..fbac0488b51f 100644 --- a/.github/workflows/ruby-qltest.yml +++ b/.github/workflows/ruby-qltest.yml @@ -50,6 +50,7 @@ jobs: xargs codeql execute upgrades testdb diff -q testdb/ruby.dbscheme downgrades/initial/ruby.dbscheme qltest: + if: github.repository_owner == 'github' runs-on: ubuntu-latest-xl strategy: fail-fast: false diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index ff9cd29e238d..a461fbfdf8ce 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -37,36 +37,40 @@ jobs: # not using a matrix as you cannot depend on a specific job in a matrix, and we want to start linux checks # without waiting for the macOS build build-and-test-macos: + if: github.repository_owner == 'github' runs-on: macos-12-xl steps: - uses: actions/checkout@v4 - uses: ./swift/actions/build-and-test build-and-test-linux: + if: github.repository_owner == 'github' runs-on: ubuntu-latest-xl steps: - uses: actions/checkout@v4 - uses: ./swift/actions/build-and-test qltests-linux: + if: github.repository_owner == 'github' needs: build-and-test-linux runs-on: ubuntu-latest-xl steps: - uses: actions/checkout@v4 - uses: ./swift/actions/run-ql-tests qltests-macos: - if : ${{ github.event_name == 'pull_request' }} + if: ${{ github.repository_owner == 'github' && github.event_name == 'pull_request' }} needs: build-and-test-macos runs-on: macos-12-xl steps: - uses: actions/checkout@v4 - uses: ./swift/actions/run-ql-tests integration-tests-linux: + if: github.repository_owner == 'github' needs: build-and-test-linux runs-on: ubuntu-latest-xl steps: - uses: actions/checkout@v4 - uses: ./swift/actions/run-integration-tests integration-tests-macos: - if : ${{ github.event_name == 'pull_request' }} + if: ${{ github.repository_owner == 'github' && github.event_name == 'pull_request' }} needs: build-and-test-macos runs-on: macos-12-xl timeout-minutes: 60