-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (34 loc) · 1.2 KB
/
update-deps.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
name: Update dependencies
on:
workflow_dispatch: {}
schedule:
- cron: "0 12 * * 0"
jobs:
update-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.5
- uses: DeterminateSystems/nix-installer-action@v1
- name: Update rust-overlay
run: |
nix flake lock --update-input rust-overlay
sed -i "s/nightlyVersion = .\+;/nightlyVersion = \"$(nix eval .#rust-bin.nightly.latest._manifest.date | jq -r)\";/" templates/rust/flake.nix
- name: Update nixpkgs
run: |
nix flake lock --update-input nixpkgs
- name: Check updated flake
run: |
nix flake check
cd templates/rust; nix flake check --override-input mars-std "path:$PWD/../.."
- name: Commit changes
id: commit
continue-on-error: true
run: |
git config --local user.email "actions@github.com"
git config --local user.name "github-actions[bot]"
git add flake.lock templates/rust/flake.nix
git commit -m "Update dependencies"
git --no-pager show
- name: Push changes
if: steps.commit.outcome == 'success'
uses: ad-m/github-push-action@master