Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add a new workflow that tries to automatically update nix hashes #2871

Merged
merged 26 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/update-hash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Update nix hashes

on:
push:

jobs:
update-hash:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# This is needed to be able to push and trigger CI with that push
token: ${{ secrets.NIV_UPDATER_TOKEN }}
- uses: cachix/install-nix-action@v13
ggreif marked this conversation as resolved.
Show resolved Hide resolved
with:
nix_path: nixpkgs=channel:nixos-21.11
- uses: cachix/cachix-action@v10
with:
name: ic-hs-test
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Update drun cargo hash
run: |
cd nix
nix run -f . nix-update -c nix-update --version=skip drun
ggreif marked this conversation as resolved.
Show resolved Hide resolved
- name: Commit changes
uses: EndBug/[email protected]
ggreif marked this conversation as resolved.
Show resolved Hide resolved
with:
author_name: Nix hash updater
author_email: "<[email protected]>"
message: "Updating nix hashes"
# do not pull: if this branch is behind, then we might as well let
# the pushing fail
pull: "NO-PULL"
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ rec {
nixpkgs.ocamlPackages.utop
nixpkgs.fswatch
nixpkgs.niv
nixpkgs.nix-update
nixpkgs.rlwrap # for `rlwrap moc`
]
));
Expand Down
2 changes: 1 addition & 1 deletion nix/drun.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pkgs:
# To automate this, try running the following in the nix/ directory
# nix run -f https://github.com/Mic92/nix-update/archive/master.tar.gz -c nix-update --version=skip drun
ggreif marked this conversation as resolved.
Show resolved Hide resolved

cargoSha256 = "sha256:1m2a12ds4bpg3v0wfn4svcplr68118vcdzs5mvll6s71j9bpgqli";
cargoSha256 = "sha256-7rlHdG7TYwvCZ77yqBXUZ3LfKb6brqDolKyATFunphg=";

nativeBuildInputs = with pkgs; [
pkg-config
Expand Down