-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (45 loc) · 1.44 KB
/
update-dependencies.yml
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
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
name: Update Dependencies
jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- name: Timestamp Action
run: |
echo "NOW=$(date +'%Y-%m-%d-%I-%M-%S')" >> $GITHUB_OUTPUT
id: version
- name: Checkout Source
uses: actions/checkout@v4
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Cargo Edit
run: |
cargo install -f cargo-edit
- name: Update Rust Dependencies
id: update-rust-dependencies
run: |
cargo update
echo 'CARGO_UPGRADE_OUTPUT<<EOF' >> $GITHUB_OUTPUT
cargo-upgrade upgrade --incompatible 2>&1 >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
add-paths: |
Cargo.toml
title: Update dependencies
body: |
Updated dependencies:
```
${{ steps.update-rust-dependencies.outputs.CARGO_UPGRADE_OUTPUT }}
```
commit-message: |
Update dependencies
${{ steps.update-rust-dependencies.outputs.CARGO_UPGRADE_OUTPUT }}
assignees: StefanBossbaly
branch: update-dependencies-${{ steps.version.outputs.NOW }}
delete-branch: true
token: ${{ secrets.PAT_TOKEN }}