CICD-096 · Package a fixed release manifest
Encyclopedia · Artifact handoffs · All snippets
Previous · CICD-095 · Next · CICD-097
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites actions runner, trusted producers and files actually generated by tests.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
mkdir -p dist
jq -n --arg sha "$(git rev-parse HEAD)" '{source_commit:$sha}' > dist/release.json3. How it works
The expression filters or transforms the input JSON. Where jq -e is used, a false or empty result can fail the gate. Git resolves the revision to its object identity. Save the resulting commit SHA as evidence instead of a moving branch name.
4. Verify the result
Use an immutable Git SHA rather than branch name. Add artifact digest after the build.
Validation syntax-validated (Bash parse). Status definitions.