ci: add check and format workflows
This commit is contained in:
		
							parent
							
								
									6f3ab0b8d3
								
							
						
					
					
						commit
						082722b2a8
					
				
					 3 changed files with 94 additions and 21 deletions
				
			
		
							
								
								
									
										57
									
								
								.github/workflows/cachix.yaml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										57
									
								
								.github/workflows/cachix.yaml
									
										
									
									
										vendored
									
									
								
							|  | @ -1,30 +1,45 @@ | |||
| name: Build Packages | ||||
| name: "Build packages and push to cache" | ||||
| on: | ||||
|   push: | ||||
|     paths:  | ||||
|       - "outputs/pkgs/**" | ||||
|       - outputs/pkgs/** | ||||
|     branches: | ||||
|       - main | ||||
| concurrency: | ||||
|   group: ooknet-cache-${{ github.ref }} | ||||
|   cancel-in-progress: true | ||||
| jobs: | ||||
|   build: | ||||
|     runs-on: ubuntu-latest | ||||
|     strategy: | ||||
|       matrix: | ||||
|         package: | ||||
|           - ook-vim | ||||
|           - live-buds-cli | ||||
|           - caddy-with-cloudflare | ||||
|           - fpp-config | ||||
|           - fpp-launcher | ||||
|           - fpp-sd | ||||
|           - project-plus | ||||
|           - repomix | ||||
|           - website | ||||
|           - wii-u-gc-adapter | ||||
|           - spotify-player | ||||
|     steps: | ||||
|     - uses: actions/checkout@v4 | ||||
|     - uses: cachix/install-nix-action@v25 | ||||
|     - uses: cachix/cachix-action@v14 | ||||
|       with: | ||||
|         name: ooknet | ||||
|         authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||||
|     - name: Build packages | ||||
|       run: |  | ||||
|         nix build \ | ||||
|           .#ook-vim \ | ||||
|           .#live-buds-cli \ | ||||
|           .#caddy-with-cloudflare \ | ||||
|           .#fpp-config \ | ||||
|           .#fpp-launcher \ | ||||
|           .#fpp-sd \ | ||||
|           .#project-plus \ | ||||
|           .#repomix \ | ||||
|           .#website \ | ||||
|           .#wii-u-gc-adapter | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v4 | ||||
|       - name: Setup Nix | ||||
|         uses: DeterminateSystems/nix-installer-action@main | ||||
|       - name: Magic Nix Cache | ||||
|         uses: DeterminateSystems/magic-nix-cache-action@main | ||||
|       - name: Setup Cachix | ||||
|         uses: cachix/cachix-action@v15 | ||||
|         with: | ||||
|           name: ooknet | ||||
|           authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||||
|           extraPullNames: nix-community | ||||
|       - name: Check Flake | ||||
|         run: nix flake check | ||||
|       - name: Build packages | ||||
|         run: nix build .#${{ matrix.package }} --print-build-logs | ||||
|         continue-on-error: true | ||||
|  |  | |||
							
								
								
									
										24
									
								
								.github/workflows/check.yaml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								.github/workflows/check.yaml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| name: "Nix Flake Check" | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|     paths-ignore: | ||||
|       - outputs/pkgs/** | ||||
|       - .github/** | ||||
| concurrency: | ||||
|   group: ooknet-check-${{ github.ref }} | ||||
|   cancel-in-progress: true | ||||
| jobs: | ||||
|   nix-flake-check: | ||||
|     name: Evaluate Flake | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v4 | ||||
|       - name: Setup Nix | ||||
|         uses: DeterminateSystems/nix-installer-action@main | ||||
|       - name: Magic Nix Cache | ||||
|         uses: DeterminateSystems/magic-nix-cache-action@main | ||||
|       - name: Nix Flake | ||||
|         run: nix flake check | ||||
							
								
								
									
										34
									
								
								.github/workflows/format.yaml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								.github/workflows/format.yaml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,34 @@ | |||
| name: "Format Flake" | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|     paths-ignore: | ||||
|       - .github/** | ||||
|       - .gitignore | ||||
| jobs: | ||||
|   alejandra: | ||||
|     name: Format with Alejandra | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v4 | ||||
|       - name: Setup Nix | ||||
|         uses: DeterminateSystems/nix-installer-action@main | ||||
|       - name: Nix Magic Cache | ||||
|         uses: DeterminateSystems/magic-nix-cache-action@main | ||||
|       - name: Format Flake | ||||
|         run: nix run nixpkgs#alejandra -- -c . | ||||
|   deadnix: | ||||
|     name: Dead Code Analysis with Deadnix | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v4 | ||||
|       - name: Setup Nix | ||||
|         uses: DeterminateSystems/nix-installer-action@main | ||||
|       - name: Setup Deadnix | ||||
|         uses: cachix/cachix-action@v15 | ||||
|         with:  | ||||
|           name: deadnix | ||||
|       - uses: astro/deadnix-action@main | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue