Skip to content

Add conditional execution for workflows based on repository owner#5345

Merged
gautamdsheth merged 1 commit into
devfrom
feat/change-wf-issue
Jun 8, 2026
Merged

Add conditional execution for workflows based on repository owner#5345
gautamdsheth merged 1 commit into
devfrom
feat/change-wf-issue

Conversation

@gautamdsheth

Copy link
Copy Markdown
Collaborator

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Changes GH action to execute only when in PnP repo

Copilot AI review requested due to automatic review settings June 8, 2026 19:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates multiple GitHub Actions workflows to conditionally run jobs only when the workflow is executing in the upstream PnP repository (i.e., when github.repository_owner == 'pnp'). This prevents forked copies of the repo from running release/signing/publishing automation while preserving behavior in the official org repo.

Changes:

  • Added if: github.repository_owner == 'pnp' job-level conditions across release, signing, and publishing workflows.
  • Applied the same conditional gating to scheduled/nightly Docker publishing workflows and associated manifest jobs.
  • Added the owner check to documentation- and PR-related workflows to avoid unintended execution in forks.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/stabledockerimages.yml Gates Docker stable image publishing jobs to only run under the pnp org.
.github/workflows/signedrelease.yml Gates the build/sign release job to only run under the pnp org.
.github/workflows/scorecard.yml Gates Scorecard analysis job to only run under the pnp org.
.github/workflows/pnpframeworkbuild.yml Gates PnP.Framework build/sign/package job to only run under the pnp org.
.github/workflows/pnpcorebuild.yml Gates PnP.Core build/sign/package job to only run under the pnp org.
.github/workflows/nightlyrelease.yml Gates nightly release job to only run under the pnp org.
.github/workflows/nightlydockerimages.yml Gates nightly Docker build/push and manifest jobs to only run under the pnp org.
.github/workflows/majorrelease.yml Gates major release job to only run under the pnp org.
.github/workflows/codeql.yml Gates CodeQL analysis job to only run under the pnp org.
.github/workflows/closestaleissues.yml Gates stale issue automation job to only run under the pnp org.
.github/workflows/cleanupnightlyreleases.yml Gates nightly release cleanup job to only run under the pnp org.
.github/workflows/checkdocumentationbuild.yml Gates doc build verification job to only run under the pnp org.
.github/workflows/buildpr.yml Gates PR build job to only run under the pnp org.
.github/workflows/buildexternalhelp.yml Gates external help build job to only run under the pnp org.
.github/workflows/builddocsite.yml Gates doc site build/publish job to only run under the pnp org.

@gautamdsheth gautamdsheth merged commit 594fa76 into dev Jun 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants