-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.45 KB
/
dependency-update.yaml
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
on:
workflow_dispatch:
schedule:
- cron: '0 0 */2 * *'
name: Update dependencies
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Setup Nushell
uses: hustcer/setup-nu@main
with:
version: "*"
- uses: actions/checkout@v2
- name: prepare
shell: nu {0}
run: |
nu -c '
cargo install cargo-edit cargo-upgrades nu_plugin_inc -f
'
- name: Update Dependencies
shell: nu {0}
run: |
nu -c '
register /home/runner/.cargo/bin/nu_plugin_inc
cargo upgrade
let changed = git status -s | is-empty | not $in
if ($changed) {
open Cargo.toml
| upsert package.version ( $in
| get package.version
| inc --patch
)
| save Cargo.toml -f
open package.nuon
| upsert version ( open Cargo.toml | get package.version )
| save package.nuon -f
cargo upgrade
}
echo { "changed": $changed }
'
- uses: EndBug/add-and-commit@v9
with:
author_name: GitHub-Action