Skip to content

Commit 5480af4

Browse files
committed
fix: add files
1 parent b4fdffe commit 5480af4

File tree

13 files changed

+465
-263
lines changed

13 files changed

+465
-263
lines changed

README.md

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ Verify commit signatures using [Auths](https://github.com/auths-dev/auths) ident
88
- uses: actions/checkout@v4
99
with:
1010
fetch-depth: 0
11-
- uses: auths-dev/auths-verify-github-action@v1
12-
with:
13-
allowed-signers: '.auths/allowed_signers'
11+
- uses: auths-dev/verify@v1
1412
```
1513
16-
That's it. The action auto-detects the commit range from the GitHub event (PR or push), downloads the `auths` CLI, and verifies each commit.
14+
That's it. The action auto-detects the commit range from the GitHub event (PR or push), downloads the `auths` CLI, and verifies each commit. Identity is auto-detected from the `identity` input (defaults to `.auths/allowed_signers`).
1715

1816
## Features
1917

@@ -31,17 +29,18 @@ That's it. The action auto-detects the commit range from the GitHub event (PR or
3129

3230
| Input | Description | Required | Default |
3331
|-------|-------------|----------|---------|
34-
| `allowed-signers` | Path to allowed_signers file | No | `.auths/allowed_signers` |
35-
| `identity-bundle` | Path to identity bundle JSON file (alternative to allowed-signers) | No | `''` |
36-
| `identity-bundle-json` | Raw identity bundle JSON content (written to temp file automatically) | No | `''` |
32+
| `identity` | Identity for verification. Accepts: CI token JSON, identity bundle JSON, file path to bundle, or path to allowed_signers file | No | `.auths/allowed_signers` (auto) |
3733
| `commit-range` | Git commit range to verify (e.g. `HEAD~5..HEAD`) | No | Auto-detected from event |
3834
| `auths-version` | Auths CLI version to use (e.g. `0.5.0`) | No | `''` (latest) |
3935
| `fail-on-unsigned` | Whether to fail the action if unsigned commits are found | No | `true` |
4036
| `skip-merge-commits` | Whether to skip merge commits during verification | No | `true` |
4137
| `post-pr-comment` | Post a PR comment with results and fix instructions (requires `pull-requests: write`) | No | `false` |
4238
| `github-token` | GitHub token for posting the PR comment (required when `post-pr-comment: true`) | No | `''` |
39+
| `artifact-paths` | Glob patterns for artifact files to verify, one per line | No | `''` |
40+
| `artifact-attestation-dir` | Directory containing `.auths.json` attestation files | No | `''` |
41+
| `fail-on-unattested` | Fail the action if any artifact lacks a valid attestation | No | `true` |
4342

44-
> **Note:** `allowed-signers` and `identity-bundle`/`identity-bundle-json` are mutually exclusive. Use one verification mode or the other.
43+
The `identity` input auto-detects the format. When empty, it defaults to the `.auths/allowed_signers` file. When only `artifact-paths` is set with an identity bundle, commit verification is skipped automatically.
4544

4645
## Outputs
4746

@@ -55,9 +54,11 @@ That's it. The action auto-detects the commit range from the GitHub event (PR or
5554

5655
## Verification Modes
5756

58-
### Mode 1: Allowed Signers File (default)
57+
The `identity` input auto-detects the format:
58+
59+
### Allowed Signers File (default)
5960

60-
Commit the team's public keys to your repo:
61+
Commit the team's public keys to your repo. When `identity` is empty, the action looks for `.auths/allowed_signers`:
6162

6263
```
6364
# .auths/allowed_signers
@@ -66,12 +67,18 @@ bob@example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA...
6667
```
6768

6869
```yaml
69-
- uses: auths-dev/auths-verify-github-action@v1
70+
- uses: auths-dev/verify@v1
71+
```
72+
73+
Or pass a custom path:
74+
75+
```yaml
76+
- uses: auths-dev/verify@v1
7077
with:
71-
allowed-signers: '.auths/allowed_signers'
78+
identity: 'path/to/allowed_signers'
7279
```
7380

74-
### Mode 2: Identity Bundle (stateless CI)
81+
### Identity Bundle (stateless CI)
7582

7683
Export your identity bundle locally and store it as a GitHub secret:
7784

@@ -80,20 +87,20 @@ auths id export-bundle --alias mykey --output bundle.json
8087
gh secret set AUTHS_IDENTITY_BUNDLE < bundle.json
8188
```
8289

83-
Then use the secret in your workflow:
90+
Then pass the secret directly — the action detects the JSON format automatically:
8491

8592
```yaml
86-
- uses: auths-dev/auths-verify-github-action@v1
93+
- uses: auths-dev/verify@v1
8794
with:
88-
identity-bundle-json: ${{ secrets.AUTHS_IDENTITY_BUNDLE }}
95+
identity: ${{ secrets.AUTHS_IDENTITY_BUNDLE }}
8996
```
9097

9198
Or commit the bundle (it contains only public data) and reference the file:
9299

93100
```yaml
94-
- uses: auths-dev/auths-verify-github-action@v1
101+
- uses: auths-dev/verify@v1
95102
with:
96-
identity-bundle: '.auths/identity-bundle.json'
103+
identity: '.auths/identity-bundle.json'
97104
```
98105

99106
## Example Workflows
@@ -115,9 +122,7 @@ jobs:
115122
with:
116123
fetch-depth: 0
117124
118-
- uses: auths-dev/auths-verify-github-action@v1
119-
with:
120-
allowed-signers: '.auths/allowed_signers'
125+
- uses: auths-dev/verify@v1
121126
```
122127

123128
### Identity Bundle with Secret
@@ -134,17 +139,16 @@ jobs:
134139
with:
135140
fetch-depth: 0
136141
137-
- uses: auths-dev/auths-verify-github-action@v1
142+
- uses: auths-dev/verify@v1
138143
with:
139-
identity-bundle-json: ${{ secrets.AUTHS_IDENTITY_BUNDLE }}
144+
identity: ${{ secrets.AUTHS_IDENTITY_BUNDLE }}
140145
```
141146

142147
### Non-blocking (Warn Only)
143148

144149
```yaml
145-
- uses: auths-dev/auths-verify-github-action@v1
150+
- uses: auths-dev/verify@v1
146151
with:
147-
allowed-signers: '.auths/allowed_signers'
148152
fail-on-unsigned: 'false'
149153
```
150154

@@ -164,9 +168,8 @@ jobs:
164168
with:
165169
fetch-depth: 0
166170
167-
- uses: auths-dev/auths-verify-github-action@v1
171+
- uses: auths-dev/verify@v1
168172
with:
169-
allowed-signers: '.auths/allowed_signers'
170173
post-pr-comment: 'true'
171174
github-token: ${{ secrets.GITHUB_TOKEN }}
172175
```
@@ -176,9 +179,8 @@ jobs:
176179
```yaml
177180
- name: Verify commits
178181
id: verify
179-
uses: auths-dev/auths-verify-github-action@v1
182+
uses: auths-dev/verify@v1
180183
with:
181-
allowed-signers: '.auths/allowed_signers'
182184
fail-on-unsigned: 'false'
183185
184186
- name: Gate a downstream step on verification
@@ -211,9 +213,9 @@ jobs:
211213
with:
212214
fetch-depth: 0
213215
214-
- uses: auths-dev/auths-verify-github-action@v1
216+
- uses: auths-dev/verify@v1
215217
with:
216-
identity-bundle-json: ${{ secrets.AUTHS_IDENTITY_BUNDLE }}
218+
identity: ${{ secrets.AUTHS_IDENTITY_BUNDLE }}
217219
fail-on-unsigned: ${{ inputs.mode == 'enforce' && 'true' || 'false' }}
218220
```
219221

action.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
name: 'Verify Commit Signatures with Auths'
2-
description: 'Verify commit signatures using Auths identity keys'
1+
name: 'Verify with Auths'
2+
description: 'Verify commit signatures and artifact attestations using Auths identity keys'
33
author: 'auths'
44

55
inputs:
6-
allowed-signers:
7-
description: 'Path to allowed_signers file'
8-
required: false
9-
default: '.auths/allowed_signers'
10-
identity-bundle:
11-
description: 'Path to identity bundle JSON file (alternative to allowed-signers)'
12-
required: false
13-
default: ''
14-
identity-bundle-json:
15-
description: 'Raw identity bundle JSON content (written to temp file automatically)'
6+
identity:
7+
description: 'Identity for verification. Accepts: AUTHS_CI_TOKEN JSON, identity bundle JSON, file path to bundle, or path to allowed_signers file. Default: .auths/allowed_signers'
168
required: false
179
default: ''
1810
commit-range:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

0 commit comments

Comments
 (0)