Skip to content

process subjects in batches #211

process subjects in batches

process subjects in batches #211

Workflow file for this run

name: Continuous Integration
on:
pull_request:
branches:
- main
push:
branches:
- main
- 'releases/*'
permissions: {}
jobs:
test-typescript:
name: TypeScript Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
id: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: .node-version
cache: npm
- name: Install Dependencies
id: npm-ci
run: npm ci
- name: Check Format
id: npm-format-check
run: npm run format:check
- name: Lint
id: npm-lint
run: npm run lint
- name: Test
id: npm-ci-test
run: npm run ci-test
test-attest:
name: Test attest action
runs-on: ubuntu-latest
permissions:
contents: read
attestations: write
id-token: write
env:
SUBJECT: /repos/${{ github.repository }}/tarball/${{ github.sha }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Calculate subject digest
id: subject
env:
GH_TOKEN: ${{ github.token }}
run: |
SHA_256=$(gh api "${{ env.SUBJECT }}" | shasum -a 256 | cut -d " " -f 1)
echo "sha-256=${SHA_256}" >> "$GITHUB_OUTPUT"
- name: Run attest
id: attest
env:
INPUT_PRIVATE-SIGNING: 'true'
uses: ./
with:
subject-name: 'https://api.github.com${{ env.SUBJECT }}'
subject-digest: 'sha256:${{ steps.subject.outputs.sha-256 }}'
predicate-type: 'https://in-toto.io/attestation/release/v0.1'
predicate:
'{"purl":"pkg:github/${{ github.repository }}@${{ github.sha }}"}'
- name: Dump output
run: jq < ${{ steps.attest.outputs.bundle-path }}