Skip to content

feat(validator): add Chainsaw-style health check assertions via --dat… #10

feat(validator): add Chainsaw-style health check assertions via --dat…

feat(validator): add Chainsaw-style health check assertions via --dat… #10

Workflow file for this run

# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.

Check failure on line 1 in .github/workflows/build-attested.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-attested.yaml

Invalid workflow file

(Line: 36, Col: 3): The workflow must contain at least one job with no dependencies.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Build attested binaries on-demand without cutting a release tag.
# Produces tar.gz archives with SLSA Build Provenance v1 attestation
# as downloadable job artifacts.
## NOTE: THIS WORKFLOW IS FOR TESTING PURPOSES ONLY.
## if you need something attested by ci. This does not run tests or security scans.
## The only complete/valid way to attest that passes all validation is via on-tag.yaml.
## Validate attestations requires to pass the following certificate identity regexp:
## --certificate-identity-regexp 'https://github.com/NVIDIA/aicr/.github/workflows/on-tag\.yaml@refs/tags/.*'
## so this attestation is not the same as a production release.
name: Build Attested Binaries
on:
workflow_dispatch: {}
permissions:
contents: read
id-token: write
jobs:
build-and-attest:
needs: [tests, security-scan]
name: Build and Attest Binaries
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: go.mod
cache: true
- name: Install Cosign
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
install-only: true
- name: Generate SLSA predicate
uses: ./.github/actions/generate-slsa-predicate
with:
workflow_file: build-attested.yaml
- name: Build and attest
env:
GOFLAGS: -mod=vendor
run: |
set -euo pipefail
goreleaser release --snapshot --clean --skip=publish,ko,sbom --timeout 10m
- name: Verify archive contents
run: |
set -euo pipefail
echo "=== Archives ==="
ls -la dist/aicr_v*.tar.gz 2>/dev/null || echo "No archives found"
echo ""
for archive in dist/aicr_v*.tar.gz; do
[ -f "$archive" ] || continue
echo "--- $(basename "$archive") ---"
tar -tzf "$archive"
echo ""
done
- name: Upload archives
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: aicr-attested-binaries
path: dist/*.tar.gz
retention-days: 3