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
name: "Cargo Update"
on:
schedule:
- cron: "0 0 * * 1" # Runs every Monday at midnight
workflow_dispatch: # Allows manual triggering of the workflow
env:
CARGO_TERM_COLOR: always
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.1
with:
ref: master
fetch-depth: 0 # Ensure full history is fetched for branch operations
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Generate date for branch
id: date
run: echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
- name: Update Cargo dependencies
run: cargo update
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7.0.5
with:
base: master
branch: cargo-update-${{ env.DATE }}
title: "Full cargo update"
body: "This pull request updates all dependencies."
commit-message: 'Full cargo update'
labels: dependencies
reviewers: lmagitem