-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (34 loc) · 1.13 KB
/
cargo-lock-update.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
name: cargo-lock-update
on:
push:
branches-ignore:
- master
concurrency:
group: ${{ github.ref }}-cargo-lock-update
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: -D warnings
jobs:
cargo-lock-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.PAT_CARGO_LOCK_UPDATE }} # https://github.com/stefanzweifel/git-auto-commit-action#commits-made-by-this-action-do-not-trigger-new-workflow-runs
- run: rustup toolchain install stable --profile minimal
- uses: ./.github/actions/build-for-all-projects
- uses: Swatinem/rust-cache@v2
- run: for-all-projects run --metadata
- name: Check for changes
run: |
filtered_files=$(git diff --name-only | grep -v 'Cargo.lock' || true)
if [ -n "$filtered_files" ]; then
echo "Error: Detected changes in files other than Cargo.lock:"
echo "$filtered_files"
exit 1
fi
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update Cargo.lock