Skip to content

Commit 5ed9d12

Browse files
committed
build: add sign and verify badges
1 parent 562d0ef commit 5ed9d12

4 files changed

Lines changed: 50 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,4 @@ jobs:
3333
exit 1
3434
}
3535
36-
verify-commits:
37-
runs-on: ubuntu-latest
38-
steps:
39-
- uses: actions/checkout@v4
40-
with:
41-
fetch-depth: 0
42-
43-
- name: Verify commit signatures
44-
uses: ./
45-
with:
46-
fail-on-unsigned: true
4736

.github/workflows/sign-commits.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Sign Commits
2+
on:
3+
push:
4+
branches: [main]
5+
paths-ignore:
6+
- '**.md'
7+
- 'docs/**'
8+
- 'LICENSE*'
9+
- '.gitignore'
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
sign-commits:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- uses: auths-dev/sign@v1
23+
with:
24+
token: ${{ secrets.AUTHS_CI_TOKEN }}
25+
commits: 'HEAD~1..HEAD'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Verify Commits
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
verify:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: ./
20+
with:
21+
fail-on-unsigned: true
22+
post-pr-comment: 'true'
23+
github-token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Auths Verify Action
22

33
[![Verified with Auths](https://img.shields.io/badge/Verified%20with-Auths-4B9CD3?logo=github&logoColor=white)](https://github.com/auths-dev/verify)
4+
[![Verify Commits](https://github.com/auths-dev/verify/actions/workflows/verify-commits.yml/badge.svg)](https://github.com/auths-dev/verify/actions/workflows/verify-commits.yml?query=branch%3Amain+event%3Apush)
5+
[![Sign Commits](https://github.com/auths-dev/verify/actions/workflows/sign-commits.yml/badge.svg)](https://github.com/auths-dev/verify/actions/workflows/sign-commits.yml?query=branch%3Amain)
46

57
Verify commit signatures using [Auths](https://github.com/auths-dev/auths) token keys. Ensures every commit in a PR or push is cryptographically signed by an authorized developer.
68

0 commit comments

Comments
 (0)