feat(action): attestation/generate-digest - Generate SHA256 digest for subject

Open
#25 2 comments 0 reactions 1 assignee View on GitHub

@aRustyDev is already working on this.

Since Jan 27, 2026.

Assessment

This issue has not been assessed yet.

Description

enhancement new-action

Parent Epic

Part of #22 (Atomic Release Pipeline Actions)

Priority

P0 - Core attestation functionality used by all workflows

Description

Create a composite action that generates a SHA256 digest for an attestation subject.

Supports both file content and string content for flexible attestation subjects.

Inputs

Input Required Default Description
content Yes - Content to hash (file path or string)
type No string Content type: "file" or "string"

Outputs

Output Description
digest SHA256 digest in format "sha256:..."

Usage Example

# Hash a string
- uses: arustydev/gha/actions/attestation/generate-digest@v1
  id: digest
  with:
    content: '{"workflow": "atomize", "artifacts": ["chart-a", "chart-b"]}'
    type: string

# Hash a file
- uses: arustydev/gha/actions/attestation/generate-digest@v1
  id: file-digest
  with:
    content: charts/my-chart/Chart.yaml
    type: file

- run: echo "Digest: ${{ steps.digest.outputs.digest }}"

Source Reference

helm-charts/.github/scripts/attestation-lib.sh:

  • generate_subject_digest() (lines 360-376)

Implementation Notes

  • Use sha256sum for hashing
  • Validate file exists when type=file
  • Output format must be "sha256:"
Dominant language
Shell
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aRustyDev/gh

All issues in aRustyDev/gh

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.