Skip to content

Commit ceb1390

Browse files
committed
ci: rework
1 parent 623dd0a commit ceb1390

File tree

4 files changed

+69
-31
lines changed

4 files changed

+69
-31
lines changed

Diff for: .github/workflows/audit.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Security Audit
2+
3+
on:
4+
push:
5+
paths:
6+
- '**/Cargo.toml'
7+
- '**/Cargo.lock'
8+
pull_request:
9+
paths:
10+
- '**/Cargo.toml'
11+
- '**/Cargo.lock'
12+
13+
jobs:
14+
security_audit:
15+
permissions:
16+
issues: write
17+
issues-reason: to create issues
18+
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: rustsec/audit-check@v1.4.1
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}

Diff for: .github/workflows/audit_schedule.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Periodic Security audit
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 1'
5+
6+
jobs:
7+
security_audit:
8+
permissions:
9+
issues: write
10+
issues-reason: to create issues
11+
checks: write
12+
checks-reason: to create check
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: rustsec/audit-check@v1.4.1
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}

Diff for: .github/workflows/deny.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Dependency Linting
2+
3+
on:
4+
push:
5+
paths:
6+
- '**/Cargo.toml'
7+
- '**/Cargo.lock'
8+
pull_request:
9+
paths:
10+
- '**/Cargo.toml'
11+
- '**/Cargo.lock'
12+
13+
jobs:
14+
dependency_linting:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: EmbarkStudios/cargo-deny-action@v2

Diff for: .github/workflows/rust.yml

+4-31
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
name: Rust
22

3-
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
3+
on: [push, pull_request]
84

95
env:
106
CARGO_TERM_COLOR: always
117

128
jobs:
139
build:
1410

11+
name: Rust Build
1512
runs-on: ubuntu-latest
1613

1714
steps:
@@ -35,36 +32,11 @@ jobs:
3532
- name: Run tests
3633
run: cargo test --verbose
3734

38-
audit:
39-
40-
runs-on: ubuntu-latest
41-
42-
steps:
43-
- uses: actions/checkout@v4
44-
45-
- name: Install cargo audit
46-
run: cargo install cargo-audit
47-
48-
- name: Check for vulnerable crates
49-
run: cargo audit
50-
51-
deny:
52-
53-
runs-on: ubuntu-latest
54-
55-
steps:
56-
- uses: actions/checkout@v4
57-
58-
- name: Install cargo deny
59-
run: cargo install cargo-deny
60-
61-
- name: Check for denied crates
62-
run: cargo deny check
63-
6435
spaces-check:
6536

6637
name: Spaces Check
6738
runs-on: ubuntu-latest
39+
6840
steps:
6941
- uses: actions/checkout@v4
7042

@@ -75,6 +47,7 @@ jobs:
7547

7648
name: Codespell
7749
runs-on: ubuntu-latest
50+
7851
steps:
7952
- uses: actions/checkout@v4
8053

0 commit comments

Comments
 (0)