diff --git a/eng/common/pipelines/templates/steps/publish-1es-artifact.yml b/eng/common/pipelines/templates/steps/publish-1es-artifact.yml index 81ade0f1a..30d38828e 100644 --- a/eng/common/pipelines/templates/steps/publish-1es-artifact.yml +++ b/eng/common/pipelines/templates/steps/publish-1es-artifact.yml @@ -31,8 +31,8 @@ steps: inputs: artifactName: '$(PublishArtifactName)' targetPath: '${{ parameters.ArtifactPath }}' - # Disable sbom generation by default for our public validation builds to avoid unnecessary work - ${{ if eq(variables['System.TeamProject'], 'public') }}: + # Disable sbom generation by default for our public or pull request validation builds to avoid unnecessary work + ${{ if or(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: sbomEnabled: false ${{ else }}: sbomEnabled: ${{ parameters.SbomEnabled }}