From e59c270fb66dae1c0e8e72d27a88f574310be483 Mon Sep 17 00:00:00 2001 From: RyanPrussin <3878957+RyanPrussin@users.noreply.github.com> Date: Sat, 2 Aug 2025 19:18:02 -0400 Subject: [PATCH 1/7] Command: nix flake update --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 87024aec..2213a508 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1716358718, - "narHash": "sha256-NQbegJb2ZZnAqp2EJhWwTf6DrZXSpA6xZCEq+RGV1r0=", + "lastModified": 1754122398, + "narHash": "sha256-CyIrZ68gVLSZGa2ERK7zc2dGabvWp2A8PM6PII9M7gI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3f316d2a50699a78afe5e77ca486ad553169061e", + "rev": "c02d05bcf73fb496c604798c2268ed424a09e73e", "type": "github" }, "original": { From da770b9284368602019993b8bb61c760a65f0a30 Mon Sep 17 00:00:00 2001 From: RyanPrussin <3878957+RyanPrussin@users.noreply.github.com> Date: Sun, 3 Aug 2025 11:16:42 -0400 Subject: [PATCH 2/7] Fix failing GitHub Action by checking the flake on PR rather than main branch --- .github/workflows/check-flake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-flake.yml b/.github/workflows/check-flake.yml index aeedc194..d3d2256d 100644 --- a/.github/workflows/check-flake.yml +++ b/.github/workflows/check-flake.yml @@ -1,6 +1,6 @@ name: Check Nix flake on: - pull_request_target: + pull_request: paths: - '*.nix' - flake.lock From d2f907fe82a4c048dfe15df76aaa065586f68b06 Mon Sep 17 00:00:00 2001 From: RyanPrussin <3878957+RyanPrussin@users.noreply.github.com> Date: Sun, 3 Aug 2025 11:21:02 -0400 Subject: [PATCH 3/7] Debug --- .github/workflows/check-flake.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/check-flake.yml b/.github/workflows/check-flake.yml index d3d2256d..07605bfa 100644 --- a/.github/workflows/check-flake.yml +++ b/.github/workflows/check-flake.yml @@ -14,6 +14,10 @@ jobs: - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/magic-nix-cache-action@main + + - name: Print flake.lock file contents + run: cat flake.lock + - name: Check Nix flake inputs uses: DeterminateSystems/flake-checker-action@v5 with: From 79dffd26ec344cb93323707832e91bcd870631fe Mon Sep 17 00:00:00 2001 From: RyanPrussin <3878957+RyanPrussin@users.noreply.github.com> Date: Sun, 3 Aug 2025 11:48:36 -0400 Subject: [PATCH 4/7] Remove debug --- .github/workflows/check-flake.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/check-flake.yml b/.github/workflows/check-flake.yml index 07605bfa..2df3b96d 100644 --- a/.github/workflows/check-flake.yml +++ b/.github/workflows/check-flake.yml @@ -15,9 +15,6 @@ jobs: - uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/magic-nix-cache-action@main - - name: Print flake.lock file contents - run: cat flake.lock - - name: Check Nix flake inputs uses: DeterminateSystems/flake-checker-action@v5 with: From 4e9ce7d9792781f6eacc94d65f21156270fdc696 Mon Sep 17 00:00:00 2001 From: RyanPrussin <3878957+RyanPrussin@users.noreply.github.com> Date: Sun, 3 Aug 2025 11:49:11 -0400 Subject: [PATCH 5/7] Remove blank line in diff --- .github/workflows/check-flake.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check-flake.yml b/.github/workflows/check-flake.yml index 2df3b96d..d3d2256d 100644 --- a/.github/workflows/check-flake.yml +++ b/.github/workflows/check-flake.yml @@ -14,7 +14,6 @@ jobs: - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/magic-nix-cache-action@main - - name: Check Nix flake inputs uses: DeterminateSystems/flake-checker-action@v5 with: From 071e781cc7985a196a4e5a151e695ccb63a33c1d Mon Sep 17 00:00:00 2001 From: RyanPrussin <3878957+RyanPrussin@users.noreply.github.com> Date: Sun, 3 Aug 2025 12:24:26 -0400 Subject: [PATCH 6/7] A nix file changed in any directory will now work --- .github/workflows/check-flake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-flake.yml b/.github/workflows/check-flake.yml index d3d2256d..11bfd385 100644 --- a/.github/workflows/check-flake.yml +++ b/.github/workflows/check-flake.yml @@ -2,7 +2,7 @@ name: Check Nix flake on: pull_request: paths: - - '*.nix' + - '**.nix' - flake.lock push: branches: From a9af1072729b53154a92b09a1bf93df33d2988cf Mon Sep 17 00:00:00 2001 From: RyanPrussin <3878957+RyanPrussin@users.noreply.github.com> Date: Sun, 3 Aug 2025 13:22:21 -0400 Subject: [PATCH 7/7] Fix GH Workflow for command: nix flake update --- .github/workflows/update-flake-dependencies.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-flake-dependencies.yml b/.github/workflows/update-flake-dependencies.yml index 85fad658..44e0e550 100644 --- a/.github/workflows/update-flake-dependencies.yml +++ b/.github/workflows/update-flake-dependencies.yml @@ -15,11 +15,14 @@ jobs: - uses: DeterminateSystems/magic-nix-cache-action@main - name: update flake.lock run: nix flake update + - name: Define Unique COMMIT_BRANCH by Timestamp + run: | + TIMESTAMP=$(date +'%Y-%m-%d-%H%M%S') + echo "COMMIT_BRANCH=automation/update-flake-dependencies-$TIMESTAMP" >> $GITHUB_ENV - name: Create signed commit with flake.lock changes env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} FILE_TO_COMMIT: flake.lock - COMMIT_BRANCH: automation/update-flake-dependencies COMMIT_MESSAGE: "chore(nix): Update Flake dependencies" run: | # make sure something actually changed first, if not, no updates required