File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change 1+ name : ' Compare Disko NixOS configs'
2+
3+ on :
4+ # Allow this workflow to be reused by other workflows:
5+ workflow_call :
6+ inputs :
7+ runner :
8+ description : ' JSON-encoded list of runner labels'
9+ default : ' ["self-hosted"]'
10+ required : false
11+ type : string
12+ secrets :
13+ NIX_GITHUB_TOKEN :
14+ description : GitHub token to add as access-token in nix.conf
15+ required : false
16+ CACHIX_AUTH_TOKEN :
17+ description : ' Cachix auth token'
18+ required : true
19+
20+ jobs :
21+ post-initial-comment :
22+ runs-on : ${{ fromJSON(inputs.runner) }}
23+ steps :
24+ - name : ' Post initial disko status comment'
25+ uses :
marocchino/[email protected] 26+ with :
27+ recreate : true
28+ message : |
29+ Thanks for your Pull Request!
30+
31+ This comment will be updated automatically with the status of disko on each machine.
32+ compare-disko-configs :
33+ runs-on : ${{ fromJSON(inputs.runner) }}
34+ name : ' Compare disko configs on machines'
35+
36+ steps :
37+ - uses : actions/checkout@v4
38+ with :
39+ fetch-depth : 0
40+
41+ - name : Install Nix
42+ uses : metacraft-labs/nixos-modules/.github/install-nix@main
43+ with :
44+ cachix-cache : ${{ vars.CACHIX_CACHE }}
45+ cachix-auth-token : ${{ secrets.CACHIX_AUTH_TOKEN }}
46+ nix-github-token : ${{ secrets.NIX_GITHUB_TOKEN }}
47+
48+ - name : Compare disko configurations
49+ run : nix run --accept-flake-config github:metacraft-labs/nixos-modules/${{ env.MCL_BRANCH }}#mcl compare_disko
50+
51+ create-comment :
52+ runs-on : ${{ fromJSON(inputs.runner) }}
53+ name : ' Create comment'
54+
55+ steps :
56+ - name : Post Comment
57+ uses :
marocchino/[email protected] 58+ with :
59+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60+ recreate : true
61+ path : comment.md
You can’t perform that action at this time.
0 commit comments