name: Automatically update Cargo.nix
on:
push:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
pull_request:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
workflow_dispatch: {}
jobs:
update-cargo-nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/install-nix-action@v25
with:
extra_nix_config: |
trusted-public-keys = nixcache:8KKuGz95Pk4UJ5W/Ni+pN+v+LDTkMMFV4yrGmAYgkDg= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://f000.backblazeb2.com/file/cache-chir-rs/ https://cache.nixos.org/
- run: echo yes | nix run github:DarkKirb/cargo2nix/update-everything -- -f
- run: git add Cargo.nix
- run: git config user.email autoupdate@chir.rs
- run: git config user.name "Autoupdater"
- run: git commit -am "Automatic Cargo.nix update" || true
- run: git push