From 851168191a6576ff9bfab6eb130590920f3ac0a0 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Sat, 5 Apr 2025 17:17:12 -0400 Subject: [PATCH 1/5] added update flake lock action --- .github/workflows/update.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/update.yml diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..f9954e3 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,21 @@ +name: update-flake-lock +on: + workflow_dispatch: # allows manual triggering + schedule: + - cron: "0 0 * * 0" # runs weekly on Sunday at 00:00 + +jobs: + lockfile: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + - name: Update flake.lock + uses: DeterminateSystems/update-flake-lock@main + with: + pr-title: "Update flake.lock" # Title of PR to be created + pr-labels: | # Labels to be set on the PR + dependencies + automated From e7f2c07a31e1dd9118b996fc97a1f3ddbf132184 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Sat, 5 Apr 2025 17:41:38 -0400 Subject: [PATCH 2/5] update workflow --- .github/workflows/update.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index f9954e3..0d472c5 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -5,7 +5,7 @@ on: - cron: "0 0 * * 0" # runs weekly on Sunday at 00:00 jobs: - lockfile: + update_lockfile: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -19,3 +19,4 @@ jobs: pr-labels: | # Labels to be set on the PR dependencies automated + token: ${{ secrets.GH_TOKEN }} From 0d41c66fccb051a5c17f1f7f036299f4e8a88080 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Sat, 5 Apr 2025 18:01:16 -0400 Subject: [PATCH 3/5] overhauled workflow --- .github/workflows/update.yml | 80 ++++++++++++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 9 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 0d472c5..976ab1d 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,6 +1,6 @@ -name: update-flake-lock +name: Update `flake.lock` on: - workflow_dispatch: # allows manual triggering + workflow_dispatch: schedule: - cron: "0 0 * * 0" # runs weekly on Sunday at 00:00 @@ -10,13 +10,75 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@main + - name: Install nix + uses: https://github.com/DeterminateSystems/nix-installer-action@main + - name: Setup Action cache for nix + uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main + - name: Update flake.lock - uses: DeterminateSystems/update-flake-lock@main + id: update + run: | + nix flake update 2> >(tee /dev/stderr) | awk ' + /^• Updated input/ {in_update = 1; print; next} + in_update && !/^warning:/ {print} + /^$/ {in_update = 0} + ' > update.log + + echo "UPDATE_LOG<> $GITHUB_ENV + cat update.log >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + + rm update.log + + - name: Write PR body template + uses: https://github.com/DamianReeves/write-file-action@v1.3 + with: + path: pr_body.template + contents: | + - The following Nix Flake inputs were updated: + + ``` + ${{ env.UPDATE_LOG }} + ``` + + Auto-generated by [update.yml][1] with the help of + [create-pull-request][2]. + + [1]: https://forgejo.stefka.eu/jiriks74/nix.nvim/src/branch/main/.github/workflows/update.yml + [2]: https://forgejo.stefka.eu/jiriks74/create-pull-request + + - name: Generate PR body + uses: pedrolamas/handlebars-action@v2.4.0 # v2.4.0 + with: + files: "pr_body.template" + output-filename: "pr_body.md" + - name: Save PR body + id: pr_body + uses: juliangruber/read-file-action@v1 + with: + path: "pr_body.md" + + - name: Remove temporary files + run: | + rm pr_body.template + rm pr_body.md + + - name: Create Pull Request + id: create-pull-request + uses: https://forgejo.stefka.eu/jiriks74/create-pull-request@2c60f3517609825873003cde0d4367c6cc2cd74c with: - pr-title: "Update flake.lock" # Title of PR to be created - pr-labels: | # Labels to be set on the PR - dependencies - automated token: ${{ secrets.GH_TOKEN }} + body: ${{ steps.pr_body.outputs.content }} + author: '"github-actions[bot]" ' + title: "automated: Update `flake.lock`" + commit-message: | + automated: Update `flake.lock` + + ${{ steps.pr_body.outputs.content }} + + branch: update-flake-lock + delete-branch: true + - name: Print PR number + run: | + echo "Pull request number is ${{ steps.create-pull-request.outputs.pull-request-number }}." + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" options From 8e39e45819ef2607d2b2776d71660e4ae3ce16a7 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Sat, 5 Apr 2025 18:24:10 -0400 Subject: [PATCH 4/5] Revert "overhauled workflow" This reverts commit 0d41c66fccb051a5c17f1f7f036299f4e8a88080. --- .github/workflows/update.yml | 80 ++++-------------------------------- 1 file changed, 9 insertions(+), 71 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 976ab1d..0d472c5 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,6 +1,6 @@ -name: Update `flake.lock` +name: update-flake-lock on: - workflow_dispatch: + workflow_dispatch: # allows manual triggering schedule: - cron: "0 0 * * 0" # runs weekly on Sunday at 00:00 @@ -10,75 +10,13 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Install nix - uses: https://github.com/DeterminateSystems/nix-installer-action@main - - name: Setup Action cache for nix - uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main - + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main - name: Update flake.lock - id: update - run: | - nix flake update 2> >(tee /dev/stderr) | awk ' - /^• Updated input/ {in_update = 1; print; next} - in_update && !/^warning:/ {print} - /^$/ {in_update = 0} - ' > update.log - - echo "UPDATE_LOG<> $GITHUB_ENV - cat update.log >> $GITHUB_ENV - echo "EOF" >> $GITHUB_ENV - - rm update.log - - - name: Write PR body template - uses: https://github.com/DamianReeves/write-file-action@v1.3 - with: - path: pr_body.template - contents: | - - The following Nix Flake inputs were updated: - - ``` - ${{ env.UPDATE_LOG }} - ``` - - Auto-generated by [update.yml][1] with the help of - [create-pull-request][2]. - - [1]: https://forgejo.stefka.eu/jiriks74/nix.nvim/src/branch/main/.github/workflows/update.yml - [2]: https://forgejo.stefka.eu/jiriks74/create-pull-request - - - name: Generate PR body - uses: pedrolamas/handlebars-action@v2.4.0 # v2.4.0 - with: - files: "pr_body.template" - output-filename: "pr_body.md" - - name: Save PR body - id: pr_body - uses: juliangruber/read-file-action@v1 - with: - path: "pr_body.md" - - - name: Remove temporary files - run: | - rm pr_body.template - rm pr_body.md - - - name: Create Pull Request - id: create-pull-request - uses: https://forgejo.stefka.eu/jiriks74/create-pull-request@2c60f3517609825873003cde0d4367c6cc2cd74c + uses: DeterminateSystems/update-flake-lock@main with: + pr-title: "Update flake.lock" # Title of PR to be created + pr-labels: | # Labels to be set on the PR + dependencies + automated token: ${{ secrets.GH_TOKEN }} - body: ${{ steps.pr_body.outputs.content }} - author: '"github-actions[bot]" ' - title: "automated: Update `flake.lock`" - commit-message: | - automated: Update `flake.lock` - - ${{ steps.pr_body.outputs.content }} - - branch: update-flake-lock - delete-branch: true - - name: Print PR number - run: | - echo "Pull request number is ${{ steps.create-pull-request.outputs.pull-request-number }}." - echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" options From ff33921c4800fa10b791f4b64fcb76e8db20a565 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 5 Apr 2025 22:34:55 +0000 Subject: [PATCH 5/5] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'darwin': 'github:lnl7/nix-darwin/ae406c04577ff9a64087018c79b4fdc02468c87c?narHash=sha256-O3bnAfsObto6l2tQOmQlrO6Z2kD6yKwOWfs7pA0CpOc%3D' (2025-02-05) → 'github:lnl7/nix-darwin/73d59580d01e9b9f957ba749f336a272869c42dd?narHash=sha256-emPWa5lmKbnyuj8c1mSJUkzJNT%2BiJoU9GMcXwjp2oVM%3D' (2025-04-01) • Updated input 'home-manager': 'github:nix-community/home-manager/bd65bc3cde04c16755955630b344bc9e35272c56?narHash=sha256-dinzAqCjenWDxuy%2BMqUQq0I4zUSfaCvN9rzuCmgMZJY%3D' (2025-01-08) → 'github:nix-community/home-manager/a9f8b3db211b4609ddd83683f9db89796c7f6ac6?narHash=sha256-2lDQBOmlz9ggPxcS7/GvcVdzXMIiT%2BPpMao6FbLJSr0%3D' (2025-04-04) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/030ba1976b7c0e1a67d9716b17308ccdab5b381e?narHash=sha256-nJj8f78AYAxl/zqLiFGXn5Im1qjFKU8yBPKoWEeZN5M%3D' (2025-02-04) → 'github:nixos/nixpkgs/bdb91860de2f719b57eef819b5617762f7120c70?narHash=sha256-s1KLDALEeqy%2BttrvqV3jx9mBZEvmthQErTVOAzbjHZs%3D' (2025-04-03) --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 39337ff..3c33cdf 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1738743987, - "narHash": "sha256-O3bnAfsObto6l2tQOmQlrO6Z2kD6yKwOWfs7pA0CpOc=", + "lastModified": 1743496612, + "narHash": "sha256-emPWa5lmKbnyuj8c1mSJUkzJNT+iJoU9GMcXwjp2oVM=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "ae406c04577ff9a64087018c79b4fdc02468c87c", + "rev": "73d59580d01e9b9f957ba749f336a272869c42dd", "type": "github" }, "original": { @@ -28,11 +28,11 @@ ] }, "locked": { - "lastModified": 1736373539, - "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", + "lastModified": 1743808813, + "narHash": "sha256-2lDQBOmlz9ggPxcS7/GvcVdzXMIiT+PpMao6FbLJSr0=", "owner": "nix-community", "repo": "home-manager", - "rev": "bd65bc3cde04c16755955630b344bc9e35272c56", + "rev": "a9f8b3db211b4609ddd83683f9db89796c7f6ac6", "type": "github" }, "original": { @@ -60,11 +60,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1738702386, - "narHash": "sha256-nJj8f78AYAxl/zqLiFGXn5Im1qjFKU8yBPKoWEeZN5M=", + "lastModified": 1743703532, + "narHash": "sha256-s1KLDALEeqy+ttrvqV3jx9mBZEvmthQErTVOAzbjHZs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "030ba1976b7c0e1a67d9716b17308ccdab5b381e", + "rev": "bdb91860de2f719b57eef819b5617762f7120c70", "type": "github" }, "original": {