-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (62 loc) · 1.9 KB
/
Copy pathdependencies.yml
File metadata and controls
78 lines (62 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Dependency Updates
on:
schedule:
# Run every Monday at 10:00 AM UTC
- cron: '0 10 * * 1'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
update-dependencies:
name: Update Dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
uses: dtolnay/rust-toolchain@1.95.0
- name: Install protobuf compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Install cargo-edit
run: cargo install cargo-edit --locked
- name: Install cargo-audit
run: cargo install cargo-audit --locked
- name: Update dependencies
run: |
cargo update
cargo upgrade --incompatible
- name: Run tests
run: cargo test
- name: Run audit
run: cargo audit
- name: Check for changes
id: changes
run: |
if git diff --quiet; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: steps.changes.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: update dependencies'
title: 'chore: update dependencies'
body: |
## Dependency Updates
This PR updates the project dependencies to their latest versions.
### Changes
- Updated Cargo.lock
- Updated dependencies in Cargo.toml (if any incompatible updates were available)
### Verification
- ✅ Tests pass
- ✅ Security audit passes
This PR was automatically created by the dependency update workflow.
branch: chore/update-dependencies
delete-branch: true