Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 26 additions & 22 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,38 @@ jobs:
fetch-depth: 1
persist-credentials: false
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
- name: Test release build-output materialization
- name: Test release catalog materialization
run: |
./tests/release_build_output_descriptors_test.sh
./tests/release_build_output_prepare_test.sh
./tests/release_build_output_test.sh
- name: Prepare release build-output dispatch smoke test
./tests/release_catalog_config_test.sh
./tests/release_catalog_descriptors_test.sh
./tests/release_catalog_prepare_test.sh
./tests/release_catalog_test.sh
- name: Prepare release catalog dispatch smoke test
run: |
mkdir -p release-build-output-smoke
printf '%s\n' smoke >release-build-output-smoke/package.tar.gz
- name: Run release build-output dispatch smoke test
uses: ./release-build-output-dispatch
mkdir -p release-catalog-smoke
printf '%s\n' smoke >release-catalog-smoke/package.tar.gz
- name: Run release catalog dispatch smoke test
uses: ./release-catalog-dispatch
env:
SHARED_ACTIONS_REPO: ${{ github.event.pull_request.head.repo.full_name }}
SHARED_ACTIONS_REF: ${{ github.event.pull_request.head.sha }}
with:
artifact-type: custom
output-directory: release-build-output-smoke
release-artifacts: '[{"path":"package.tar.gz"}]'
release-package: '{"ecosystem":"archive","name":"smoke","version":"1.0"}'
release-unit: archive:smoke
source-artifact-name: release-build-output-dispatch-smoke
config: >-
{
"artifact_type": "custom",
"release_catalog_key": "archive:smoke",
"output_directory": "release-catalog-smoke",
"package": {"ecosystem": "archive", "name": "smoke", "version": "1.0"},
"artifacts": [{"path": "package.tar.gz"}]
}
source-artifact-name: release-catalog-dispatch-smoke
source-sha: ${{ github.event.pull_request.head.sha }}
- name: Verify release build-output dispatch smoke test
- name: Verify release catalog dispatch smoke test
run: |
jq -e '
.artifacts[0].unit_id == "archive:smoke"
and .artifacts[0].path == "package.tar.gz"
' release-build-output-smoke/release-build-output.json >/dev/null
jq -e '
.metadata.artifacts == [{path: "package.tar.gz", sbom_kind: "generated-identity"}]
' release-build-output-smoke/release-build-metadata.json >/dev/null
.producer == "shared-workflows"
and .source.artifact == "release-catalog-dispatch-smoke"
and .entries[0].release_catalog_key == "archive:smoke"
and .entries[0].path == "package.tar.gz"
and .entries[0].sbom_kind == "generated-identity"
' release-catalog-smoke/release-catalog-entries.json >/dev/null
24 changes: 23 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@

ci:
autoupdate_schedule: quarterly
skip: [actionlint-docker]
# These hooks require tools unavailable in pre-commit.ci:
#
# * actionlint-docker requires Docker
# * release-catalog-config requires jq
#
# Both run in other CI jobs with controlled runtime dependencies.
skip: [actionlint-docker, release-catalog-config]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- repo: https://github.com/zizmorcore/zizmor-pre-commit
Expand Down Expand Up @@ -52,3 +59,18 @@ repos:
hooks:
- id: yamllint
additional_dependencies: [pyyaml]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.2
hooks:
- id: check-jsonschema
name: validate release catalog config schema fixtures
args: [--schemafile, release-catalog/config.schema.json]
files: ^tests/release-catalog-config/.*\.json$
- repo: local
hooks:
- id: release-catalog-config
name: validate release catalog configuration
entry: ./tests/release_catalog_config_test.sh
language: system
pass_filenames: false
files: ^(release-catalog/(config\.schema\.json|validate-config\.sh)|tests/release_catalog_config_test\.sh)$
32 changes: 6 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,15 @@ A dispatch action is one that:
* clones the shared-actions repository (repo/ref changeable using env vars)
* runs (dispatches to) another action within the clone, using a relative path

## Release build-output companions
## Release catalog companions

`release-build-output-dispatch` validates a producer's local build artifact
`release-catalog-dispatch` validates a producer's local build artifact
directory and uploads a companion artifact named
`release-build-output-<source-artifact-name>`. The companion contains
`release-build-output.json`, `release-build-metadata.json`, provenance, and an
SBOM record for every primary artifact.
`release-catalog-<source-artifact-name>`.

Conda and wheel jobs can set `artifact-type` to `conda` or `wheel` and omit
`release-artifacts`; the implementation reads package metadata from the built
files. Custom bundles provide explicit artifact descriptors and either inline
package identity or a producer-created package JSON file.

```yaml
- name: Create release build-output companion
uses: rapidsai/shared-actions/release-build-output-dispatch@main
with:
artifact-type: wheel
output-directory: ${{ steps.package-name.outputs.WHEEL_OUTPUT_DIR }}
release-unit: wheel:example
source-artifact-name: ${{ steps.package-name.outputs.RAPIDS_PACKAGE_NAME }}
source-sha: ${{ github.sha }}
```

A descriptor-selected producer SBOM is classified as `producer-dependency`.
When no SBOM is supplied, the action generates an SPDX artifact-identity
envelope and classifies it as `generated-identity`. The generated envelope
contains the primary artifact's identity and SHA-256 but no dependency
inventory; it must not be treated as dependency coverage.
See the [release catalog documentation](release-catalog/README.md)
for configuration, examples, source-revision handling, companion contents, and
evidence semantics.

The dispatch wrapper honors `SHARED_ACTIONS_REPO` and `SHARED_ACTIONS_REF`.
When neither is set, it checks out the same repository and ref used to invoke
Expand Down
72 changes: 0 additions & 72 deletions release-build-output-dispatch/action.yml

This file was deleted.

90 changes: 0 additions & 90 deletions release-build-output/action.yml

This file was deleted.

Loading
Loading