Add release build output dispatch action - #134
Open
msarahan wants to merge 1 commit into
Open
Conversation
Created with Codex (GPT-5).
This was referenced Aug 4, 2026
msarahan
marked this pull request as ready for review
August 4, 2026 15:27
KyleFromNVIDIA
approved these changes
Aug 4, 2026
KyleFromNVIDIA
left a comment
Member
There was a problem hiding this comment.
Approved with a few small nitpicks
Comment on lines
+344
to
+368
| jq -n \ | ||
| --arg artifact_name "${RELEASE_SOURCE_ARTIFACT_NAME}" \ | ||
| --arg manifest_name "${RELEASE_MANIFEST_NAME}" \ | ||
| --arg repository "${GITHUB_REPOSITORY:-}" \ | ||
| --arg run_attempt "${GITHUB_RUN_ATTEMPT:-}" \ | ||
| --arg run_id "${GITHUB_RUN_ID:-}" \ | ||
| --arg sha "${source_sha}" \ | ||
| --arg unit_id "${RELEASE_UNIT}" \ | ||
| --arg workflow_ref "${GITHUB_WORKFLOW_REF:-}" \ | ||
| --argjson artifact_metadata "${artifact_metadata}" \ | ||
| '{ | ||
| schema_version: 1, | ||
| producer: "shared-workflows", | ||
| release_unit: $unit_id, | ||
| source_artifact: $artifact_name, | ||
| build_output_manifest: $manifest_name, | ||
| build_environment: { | ||
| repository: $repository, | ||
| sha: $sha, | ||
| workflow_ref: $workflow_ref, | ||
| run_id: $run_id, | ||
| run_attempt: $run_attempt | ||
| }, | ||
| metadata: {artifacts: $artifact_metadata} | ||
| }' | jq -S . >"${metadata_path}" |
Member
There was a problem hiding this comment.
Suggested change
| jq -n \ | |
| --arg artifact_name "${RELEASE_SOURCE_ARTIFACT_NAME}" \ | |
| --arg manifest_name "${RELEASE_MANIFEST_NAME}" \ | |
| --arg repository "${GITHUB_REPOSITORY:-}" \ | |
| --arg run_attempt "${GITHUB_RUN_ATTEMPT:-}" \ | |
| --arg run_id "${GITHUB_RUN_ID:-}" \ | |
| --arg sha "${source_sha}" \ | |
| --arg unit_id "${RELEASE_UNIT}" \ | |
| --arg workflow_ref "${GITHUB_WORKFLOW_REF:-}" \ | |
| --argjson artifact_metadata "${artifact_metadata}" \ | |
| '{ | |
| schema_version: 1, | |
| producer: "shared-workflows", | |
| release_unit: $unit_id, | |
| source_artifact: $artifact_name, | |
| build_output_manifest: $manifest_name, | |
| build_environment: { | |
| repository: $repository, | |
| sha: $sha, | |
| workflow_ref: $workflow_ref, | |
| run_id: $run_id, | |
| run_attempt: $run_attempt | |
| }, | |
| metadata: {artifacts: $artifact_metadata} | |
| }' | jq -S . >"${metadata_path}" | |
| jq -n -S \ | |
| --arg artifact_name "${RELEASE_SOURCE_ARTIFACT_NAME}" \ | |
| --arg manifest_name "${RELEASE_MANIFEST_NAME}" \ | |
| --arg repository "${GITHUB_REPOSITORY:-}" \ | |
| --arg run_attempt "${GITHUB_RUN_ATTEMPT:-}" \ | |
| --arg run_id "${GITHUB_RUN_ID:-}" \ | |
| --arg sha "${source_sha}" \ | |
| --arg unit_id "${RELEASE_UNIT}" \ | |
| --arg workflow_ref "${GITHUB_WORKFLOW_REF:-}" \ | |
| --argjson artifact_metadata "${artifact_metadata}" \ | |
| '{ | |
| schema_version: 1, | |
| producer: "shared-workflows", | |
| release_unit: $unit_id, | |
| source_artifact: $artifact_name, | |
| build_output_manifest: $manifest_name, | |
| build_environment: { | |
| repository: $repository, | |
| sha: $sha, | |
| workflow_ref: $workflow_ref, | |
| run_id: $run_id, | |
| run_attempt: $run_attempt | |
| }, | |
| metadata: {artifacts: $artifact_metadata} | |
| }' >"${metadata_path}" |
Comment on lines
+238
to
+265
| jq -n \ | ||
| --arg artifact_digest "${artifact_digest}" \ | ||
| --arg artifact_path "${primary_path}" \ | ||
| --arg repository "${GITHUB_REPOSITORY:-}" \ | ||
| --arg run_attempt "${GITHUB_RUN_ATTEMPT:-}" \ | ||
| --arg run_id "${GITHUB_RUN_ID:-}" \ | ||
| --arg source_sha "${source_sha}" \ | ||
| --arg workflow_ref "${GITHUB_WORKFLOW_REF:-}" \ | ||
| --argjson package "${package}" \ | ||
| '{ | ||
| _type: "https://in-toto.io/Statement/v1", | ||
| subject: [{name: $artifact_path, digest: {sha256: $artifact_digest}}], | ||
| predicateType: "https://slsa.dev/provenance/v1", | ||
| predicate: { | ||
| buildDefinition: { | ||
| buildType: "https://rapids.ai/release-platform/build-output/v1", | ||
| externalParameters: {release_unit: env.RELEASE_UNIT, package: $package}, | ||
| resolvedDependencies: [{ | ||
| uri: ("git+https://github.com/" + $repository + "@" + $source_sha), | ||
| digest: {gitCommit: $source_sha} | ||
| }] | ||
| }, | ||
| runDetails: { | ||
| builder: {id: ("https://github.com/" + $workflow_ref)}, | ||
| metadata: {invocationId: ("https://github.com/" + $repository + "/actions/runs/" + $run_id + "/attempts/" + $run_attempt)} | ||
| } | ||
| } | ||
| }' | jq -S . >"${output_directory}/${destination}" |
Member
There was a problem hiding this comment.
Suggested change
| jq -n \ | |
| --arg artifact_digest "${artifact_digest}" \ | |
| --arg artifact_path "${primary_path}" \ | |
| --arg repository "${GITHUB_REPOSITORY:-}" \ | |
| --arg run_attempt "${GITHUB_RUN_ATTEMPT:-}" \ | |
| --arg run_id "${GITHUB_RUN_ID:-}" \ | |
| --arg source_sha "${source_sha}" \ | |
| --arg workflow_ref "${GITHUB_WORKFLOW_REF:-}" \ | |
| --argjson package "${package}" \ | |
| '{ | |
| _type: "https://in-toto.io/Statement/v1", | |
| subject: [{name: $artifact_path, digest: {sha256: $artifact_digest}}], | |
| predicateType: "https://slsa.dev/provenance/v1", | |
| predicate: { | |
| buildDefinition: { | |
| buildType: "https://rapids.ai/release-platform/build-output/v1", | |
| externalParameters: {release_unit: env.RELEASE_UNIT, package: $package}, | |
| resolvedDependencies: [{ | |
| uri: ("git+https://github.com/" + $repository + "@" + $source_sha), | |
| digest: {gitCommit: $source_sha} | |
| }] | |
| }, | |
| runDetails: { | |
| builder: {id: ("https://github.com/" + $workflow_ref)}, | |
| metadata: {invocationId: ("https://github.com/" + $repository + "/actions/runs/" + $run_id + "/attempts/" + $run_attempt)} | |
| } | |
| } | |
| }' | jq -S . >"${output_directory}/${destination}" | |
| jq -n -S \ | |
| --arg artifact_digest "${artifact_digest}" \ | |
| --arg artifact_path "${primary_path}" \ | |
| --arg repository "${GITHUB_REPOSITORY:-}" \ | |
| --arg run_attempt "${GITHUB_RUN_ATTEMPT:-}" \ | |
| --arg run_id "${GITHUB_RUN_ID:-}" \ | |
| --arg source_sha "${source_sha}" \ | |
| --arg workflow_ref "${GITHUB_WORKFLOW_REF:-}" \ | |
| --argjson package "${package}" \ | |
| '{ | |
| _type: "https://in-toto.io/Statement/v1", | |
| subject: [{name: $artifact_path, digest: {sha256: $artifact_digest}}], | |
| predicateType: "https://slsa.dev/provenance/v1", | |
| predicate: { | |
| buildDefinition: { | |
| buildType: "https://rapids.ai/release-platform/build-output/v1", | |
| externalParameters: {release_unit: env.RELEASE_UNIT, package: $package}, | |
| resolvedDependencies: [{ | |
| uri: ("git+https://github.com/" + $repository + "@" + $source_sha), | |
| digest: {gitCommit: $source_sha} | |
| }] | |
| }, | |
| runDetails: { | |
| builder: {id: ("https://github.com/" + $workflow_ref)}, | |
| metadata: {invocationId: ("https://github.com/" + $repository + "/actions/runs/" + $run_id + "/attempts/" + $run_attempt)} | |
| } | |
| } | |
| }' >"${output_directory}/${destination}" |
Comment on lines
+199
to
+228
| jq -n \ | ||
| --arg artifact_digest "${artifact_digest}" \ | ||
| --arg artifact_path "${primary_path}" \ | ||
| --argjson package "${package}" \ | ||
| '{ | ||
| spdxVersion: "SPDX-2.3", | ||
| dataLicense: "CC0-1.0", | ||
| SPDXID: "SPDXRef-DOCUMENT", | ||
| name: ("RAPIDS release artifact " + $artifact_path), | ||
| documentNamespace: ("https://rapids.ai/release-platform/spdx/" + $artifact_digest), | ||
| creationInfo: { | ||
| creators: ["Tool: rapidsai/shared-workflows release-build-output"], | ||
| created: (now | strftime("%Y-%m-%dT%H:%M:%SZ")) | ||
| }, | ||
| documentDescribes: ["SPDXRef-Artifact"], | ||
| packages: [{ | ||
| SPDXID: "SPDXRef-Artifact", | ||
| name: $package.name, | ||
| versionInfo: $package.version, | ||
| downloadLocation: "NOASSERTION", | ||
| filesAnalyzed: false, | ||
| checksums: [{algorithm: "SHA256", checksumValue: $artifact_digest}] | ||
| }], | ||
| relationships: [{ | ||
| spdxElementId: "SPDXRef-DOCUMENT", | ||
| relationshipType: "DESCRIBES", | ||
| relatedSpdxElement: "SPDXRef-Artifact" | ||
| }], | ||
| comment: "Artifact-identity SBOM envelope. A producer-supplied dependency SBOM may replace this record." | ||
| }' | jq -S . >"${output_directory}/${destination}" |
Member
There was a problem hiding this comment.
Suggested change
| jq -n \ | |
| --arg artifact_digest "${artifact_digest}" \ | |
| --arg artifact_path "${primary_path}" \ | |
| --argjson package "${package}" \ | |
| '{ | |
| spdxVersion: "SPDX-2.3", | |
| dataLicense: "CC0-1.0", | |
| SPDXID: "SPDXRef-DOCUMENT", | |
| name: ("RAPIDS release artifact " + $artifact_path), | |
| documentNamespace: ("https://rapids.ai/release-platform/spdx/" + $artifact_digest), | |
| creationInfo: { | |
| creators: ["Tool: rapidsai/shared-workflows release-build-output"], | |
| created: (now | strftime("%Y-%m-%dT%H:%M:%SZ")) | |
| }, | |
| documentDescribes: ["SPDXRef-Artifact"], | |
| packages: [{ | |
| SPDXID: "SPDXRef-Artifact", | |
| name: $package.name, | |
| versionInfo: $package.version, | |
| downloadLocation: "NOASSERTION", | |
| filesAnalyzed: false, | |
| checksums: [{algorithm: "SHA256", checksumValue: $artifact_digest}] | |
| }], | |
| relationships: [{ | |
| spdxElementId: "SPDXRef-DOCUMENT", | |
| relationshipType: "DESCRIBES", | |
| relatedSpdxElement: "SPDXRef-Artifact" | |
| }], | |
| comment: "Artifact-identity SBOM envelope. A producer-supplied dependency SBOM may replace this record." | |
| }' | jq -S . >"${output_directory}/${destination}" | |
| jq -n -S \ | |
| --arg artifact_digest "${artifact_digest}" \ | |
| --arg artifact_path "${primary_path}" \ | |
| --argjson package "${package}" \ | |
| '{ | |
| spdxVersion: "SPDX-2.3", | |
| dataLicense: "CC0-1.0", | |
| SPDXID: "SPDXRef-DOCUMENT", | |
| name: ("RAPIDS release artifact " + $artifact_path), | |
| documentNamespace: ("https://rapids.ai/release-platform/spdx/" + $artifact_digest), | |
| creationInfo: { | |
| creators: ["Tool: rapidsai/shared-workflows release-build-output"], | |
| created: (now | strftime("%Y-%m-%dT%H:%M:%SZ")) | |
| }, | |
| documentDescribes: ["SPDXRef-Artifact"], | |
| packages: [{ | |
| SPDXID: "SPDXRef-Artifact", | |
| name: $package.name, | |
| versionInfo: $package.version, | |
| downloadLocation: "NOASSERTION", | |
| filesAnalyzed: false, | |
| checksums: [{algorithm: "SHA256", checksumValue: $artifact_digest}] | |
| }], | |
| relationships: [{ | |
| spdxElementId: "SPDXRef-DOCUMENT", | |
| relationshipType: "DESCRIBES", | |
| relatedSpdxElement: "SPDXRef-Artifact" | |
| }], | |
| comment: "Artifact-identity SBOM envelope. A producer-supplied dependency SBOM may replace this record." | |
| }' >"${output_directory}/${destination}" |
| and ((.build // "") | type == "string") | ||
| and ((.platform // "") | type == "string") | ||
| ' <<<"${RELEASE_PACKAGE}" >/dev/null; then | ||
| echo "release-package must be a package object with ecosystem and name; version is optional for Conda and wheel artifacts" >&2 |
Member
There was a problem hiding this comment.
Any chance we could ensure version is present for custom artifacts?
Comment on lines
+57
to
+60
| if [[ "${RELEASE_PACKAGE_FILE}" == /* || "${RELEASE_PACKAGE_FILE}" == */../* || "${RELEASE_PACKAGE_FILE}" == ../* || "${RELEASE_PACKAGE_FILE}" == *"/.." ]]; then | ||
| echo "release-package-file must be a relative path inside output-directory: ${RELEASE_PACKAGE_FILE}" >&2 | ||
| exit 1 | ||
| fi |
Member
There was a problem hiding this comment.
This can use ensure_relative_pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this?
This is the reusable action that creates manifests for the artifacts produced by our open source builds. This is part of a plan for:
The implementation here follows our existing dispatch pattern, rather than earlier efforts that basically did the same thing on shared-workflows (rapidsai/shared-workflows#609)