From 04c38eff347ea590401c57be8f756fb731ca2983 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Mon, 29 Nov 2021 17:34:25 -0600 Subject: [PATCH] Run Codespaces prebuild only in upstream repo The codespaces prebuild action can only run in the dotnet/runtime repo and not forks. The feature needs to be enabled for each repo and will fail if it isn't enabled. In order to minimize failure notifications, add a check to the action so it only runs against dotnet/runtime. --- .github/workflows/create-codespaces-prebuild.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/create-codespaces-prebuild.yml b/.github/workflows/create-codespaces-prebuild.yml index 341254eb79347..cbae714eb4003 100644 --- a/.github/workflows/create-codespaces-prebuild.yml +++ b/.github/workflows/create-codespaces-prebuild.yml @@ -6,6 +6,8 @@ on: workflow_dispatch: jobs: createPrebuild: + # Only run in the main repository since it will fail in forks + if: github.repository == 'dotnet/runtime' permissions: contents: write runs-on: ubuntu-latest