Use this GitHub Action (GHA) for artifact traceability: Inform CloudBees Unify that an artifact version has been created, and report any build artifact data generated by a GHA workflow run.
This action is available on the GitHub marketplace.
To learn more about working with artifacts in CloudBees Unify, refer to the build artifacts documentation.
Prerequisites
Set up CloudBees Unify and GHA to work together, providing key features of CloudBees Unify to GHA workflows. Refer to Getting started for more information.
Inputs
| Input name | Data type | Required? | Description |
|---|---|---|---|
|
String |
No |
The CloudBees Unify URL.
The default value is |
|
String |
Only required if a different repository/branch. |
The commit ID from the source repository, used when registering the build artifact in CloudBees Unify. The default is |
|
String |
No |
The ID of the component associated with the artifact. If not provided, the default value is the component ID where the GHA workflow is located. |
|
String |
No, but it is recommended to help track artifact versions across repositories. |
The hash or checksum that uniquely identifies the artifact version. For more information, refer to Artifact deployment and publish history. |
|
String |
No |
A comma-separated list of artifact labels. |
|
String |
Yes |
The name of the artifact reported to CloudBees Unify. |
|
String |
Only required if a different repository/branch. |
The tag or branch of the source repository, used when registering the build artifact in CloudBees Unify. The default is |
|
String |
Only required if a different repository/branch. |
The clone URL of the source repository, used when registering the build artifact in CloudBees Unify. The default is |
|
String |
No |
The type of artifact, such as Docker or Maven. |
|
String |
Yes |
The URL where the artifact version is located.
For example, |
|
String |
Yes |
The version of the artifact to send to CloudBees Unify for artifact traceability purposes. |
Outputs
| Output name | Data type | Description |
|---|---|---|
|
String |
The identifier of the artifact sent to CloudBees Unify for artifact traceability purposes. |
This version of the action uses GitHub OIDC authentication to securely communicate with CloudBees Unify. Be sure to set permissions to id-token: write in your workflow.
|
Usage examples
The following is a basic example of using the action:
permissions: id-token: write contents: read steps: - name: register-artifact-step uses: cloudbees-io-gha/register-build-artifact@v3 with: name: my-artifact url: https://my-artifact-url.com version: 1.0.0
The following example specifies optional inputs:
Full workflow and run example
The following GHA workflow example uses version v3 of this action. Running this workflow creates an artifact that is reported to CloudBees Unify, and the artifact is shown as published by the GHA workflow.
Example GHA workflow YAML file
After the run has completed, the artifact information is displayed in both and in CloudBees Unify. The artifact is shown to be published by the GHA workflow.