Update dependencies #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |