Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
build: adding additional option for provenance generation in non-main…
Browse files Browse the repository at this point in the history
… branches
  • Loading branch information
rsoberano-ld committed Jun 3, 2024
1 parent 410a6d7 commit e49710e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ on:
type: boolean
required: true
generate_provenance:
description: 'Whether or not to generate provenance for this manual publish.'
type: boolean
required: true
description: 'Whether or not to generate provenance for this manual publish. Default behavior: generate only on main branch.'
type: choice
options:
- Default
- Generate
- Do not generate

jobs:
build:
Expand Down Expand Up @@ -62,7 +65,9 @@ jobs:
id-token: write
contents: write
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.10.0
if: ${{ inputs.generate_provenance && inputs.pkg_name == 'LaunchDarkly.ServerSdk' }}
if: |
(inputs.generate_provenance == 'Generate' || (inputs.generate_provenance == 'Default' && github.ref_name == 'main')) &&
inputs.pkg_name == 'LaunchDarkly.ServerSdk'
with:
base64-subjects: "${{ needs.build.outputs.server-sdk-hashes }}"
upload-assets: true
Expand All @@ -76,7 +81,9 @@ jobs:
id-token: write
contents: write
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.10.0
if: ${{ inputs.generate_provenance && inputs.pkg_name == 'LaunchDarkly.ServerSdk.Telemetry' }}
if: |
(inputs.generate_provenance == 'Generate' || (inputs.generate_provenance == 'Default' && github.ref_name == 'main')) &&
inputs.pkg_name == 'LaunchDarkly.ServerSdk.Telemetry'
with:
base64-subjects: "${{ needs.build.outputs.telemetry-hashes }}"
upload-assets: true
Expand Down

0 comments on commit e49710e

Please sign in to comment.