Lints and suggestions for the Nix programming language
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #127 from oppiliappan/update-flake-lock-action

ci: weekly flake lock update action

authored by

Shahar "Dawn" Or and committed by
GitHub
61e46e6a 229a40d1

+67 -3
+36
.github/workflows/update-flake-lock.yaml
··· 1 + { 2 + "jobs": { 3 + "nix-flake-update": { 4 + "permissions": { 5 + "contents": "write", 6 + "id-token": "write", 7 + "issues": "write", 8 + "pull-requests": "write" 9 + }, 10 + "runs-on": "ubuntu-latest", 11 + "steps": [ 12 + { 13 + "uses": "actions/checkout@v4" 14 + }, 15 + { 16 + "uses": "cachix/install-nix-action@v31", 17 + "with": { 18 + "github_access_token": "${{ secrets.GITHUB_TOKEN }}" 19 + } 20 + }, 21 + { 22 + "uses": "DeterminateSystems/update-flake-lock@main" 23 + } 24 + ] 25 + } 26 + }, 27 + "name": "Update flake.lock", 28 + "on": { 29 + "schedule": [ 30 + { 31 + "cron": "0 0 * * 5" 32 + } 33 + ], 34 + "workflow_dispatch": {} 35 + } 36 + }
+31 -3
flake-parts/ci.nix
··· 1 + { lib, ... }: 1 2 let 2 - filePath = ".github/workflows/check.yaml"; 3 + filePaths = { 4 + check = ".github/workflows/check.yaml"; 5 + updateFlakeLock = ".github/workflows/update-flake-lock.yaml"; 6 + }; 3 7 4 8 ids = { 5 9 jobs = { ··· 37 41 { 38 42 files.files = [ 39 43 { 40 - path_ = filePath; 44 + path_ = filePaths.check; 41 45 drv = pkgs.writers.writeJSON "gh-actions-workflow-check.yaml" { 42 46 name = "Check"; 43 47 on = { ··· 89 93 }; 90 94 }; 91 95 } 96 + { 97 + path_ = filePaths.updateFlakeLock; 98 + drv = pkgs.writers.writeJSON "update-flake-lock.yaml" { 99 + name = "Update flake.lock"; 100 + on = { 101 + workflow_dispatch = { }; 102 + schedule = [ { cron = "0 0 * * 5"; } ]; 103 + }; 104 + jobs.nix-flake-update = { 105 + permissions = { 106 + contents = "write"; 107 + id-token = "write"; 108 + issues = "write"; 109 + pull-requests = "write"; 110 + }; 111 + runs-on = runner.name; 112 + steps = [ 113 + steps.checkout 114 + steps.cachixInstallNix 115 + { uses = "DeterminateSystems/update-flake-lock@main"; } 116 + ]; 117 + }; 118 + }; 119 + } 92 120 ]; 93 121 94 - treefmt.settings.global.excludes = [ filePath ]; 122 + treefmt.settings.global.excludes = lib.attrValues filePaths; 95 123 }; 96 124 }; 97 125 }