Skip to content

Commit 0f2de73

Browse files
committed
Attest compiled binaries
1 parent c14c396 commit 0f2de73

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/compile_sqlite.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Download and compile SQLite
22

33
on:
44
workflow_call:
5+
inputs:
6+
attest:
7+
description: "Whether to generate a signed attestation for compiled artifacts"
8+
type: boolean
9+
default: false
510
outputs:
611
artifact_id:
712
description: "ID of the artifact containing prebuilt SQLite libraries"
@@ -411,6 +416,10 @@ jobs:
411416
- compile_pool_linux_android
412417
- compile_pool_apple
413418
- compile_pool_windows
419+
permissions:
420+
attestations: write
421+
id-token: write
422+
artifact-metadata: write
414423
name: Merge prebuilt libraries into single directory
415424
outputs:
416425
sqlite_merged: ${{ steps.upload.outputs.artifact-id }}
@@ -436,6 +445,14 @@ jobs:
436445
- run: ls -al out/
437446
- run: ls -al sqlite3_connection_pool/lib/src/precompiled/
438447

448+
- name: Attest
449+
if: inputs.attest
450+
uses: actions/attest@v4
451+
with:
452+
subject-path: |
453+
out/*
454+
sqlite3_connection_pool/lib/src/precompiled/*
455+
439456
- name: Upload sqlite3 binaries
440457
uses: actions/upload-artifact@v7
441458
id: upload

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
fetch_sqlite:
1515
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
1616
uses: ./.github/workflows/compile_sqlite.yml
17+
with:
18+
attest: true #todo revert
1719

1820
zizmor:
1921
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)