From 3c6203e1a7c78d8915520ac609c3f8770f766888 Mon Sep 17 00:00:00 2001 From: Dhiren Vispute <86131363+dv-msft@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:16:27 -0700 Subject: [PATCH] Use github-specified primary repository for CI/CD workflow. (#3345) Co-authored-by: Dhiren Vispute --- .github/workflows/cicd.yml | 5 +++++ .github/workflows/reusable-build.yml | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 0ec34f5dba..29f3643f76 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -49,6 +49,7 @@ jobs: uses: ./.github/workflows/reusable-build.yml with: ref: ${{ github.ref }} + repository: ${{ github.repository }} build_artifact: Build-x64 generate_release_package: true build_msi: true @@ -63,6 +64,7 @@ jobs: uses: ./.github/workflows/reusable-build.yml with: ref: ${{ github.ref }} + repository: ${{ github.repository }} build_artifact: Build-x64-native-only build_msi: true build_nuget: true @@ -266,6 +268,7 @@ jobs: uses: ./.github/workflows/reusable-build.yml with: ref: ${{ github.ref }} + repository: ${{ github.repository }} build_artifact: Build-x64-Analyze # Analysis on external projects is conditional, as on small CI/CD VMs the compiler can run OOM build_options: /p:Analysis='True' /p:AnalysisOnExternal='False' @@ -277,6 +280,7 @@ jobs: uses: ./.github/workflows/reusable-build.yml with: ref: ${{ github.ref }} + repository: ${{ github.repository }} build_artifact: Build-x64-Sanitize build_options: /p:AddressSanitizer='True' @@ -476,6 +480,7 @@ jobs: uses: ./.github/workflows/reusable-build.yml with: ref: ${{ github.ref }} + repository: ${{ github.repository }} build_artifact: Build-x64-CodeQl build_codeql: true diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index db19b78786..96d7cf8a63 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -11,6 +11,10 @@ on: ref: required: true type: string + # repository to be used (needed for self-hosted runner setups) + repository: + required: true + type: string # Name associated with the output of this build. build_artifact: required: true @@ -87,7 +91,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 if: steps.skip_check.outputs.should_skip != 'true' with: - repository: microsoft/ebpf-for-windows + repository: ${{inputs.repository}} submodules: 'recursive' ref: ${{inputs.ref}}