mirror of
				https://github.com/decalage2/awesome-security-hardening.git
				synced 2025-11-04 07:45:31 +01:00 
			
		
		
		
	Add CI action to check for broken links
This commit is contained in:
		
							
								
								
									
										18
									
								
								.github/workflows/links-fail-fast.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								.github/workflows/links-fail-fast.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					name: Links (Fail Fast)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  linkChecker:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Link Checker
 | 
				
			||||||
 | 
					        uses: lycheeverse/lychee-action@v1.5.0
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          fail: true
 | 
				
			||||||
 | 
					        env:
 | 
				
			||||||
 | 
					          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
 | 
				
			||||||
							
								
								
									
										27
									
								
								.github/workflows/links.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								.github/workflows/links.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					name: Links
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  repository_dispatch:
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					  schedule:
 | 
				
			||||||
 | 
					    - cron: "00 18 * * *"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  linkChecker:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Link Checker
 | 
				
			||||||
 | 
					        id: lychee
 | 
				
			||||||
 | 
					        uses: lycheeverse/lychee-action@v1.5.0
 | 
				
			||||||
 | 
					        env:
 | 
				
			||||||
 | 
					          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Create Issue From File
 | 
				
			||||||
 | 
					        if: steps.lychee.outputs.exit_code != 0
 | 
				
			||||||
 | 
					        uses: peter-evans/create-issue-from-file@v3
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          title: Link Checker Report
 | 
				
			||||||
 | 
					          content-filepath: ./lychee/out.md
 | 
				
			||||||
 | 
					          labels: report, automated issue
 | 
				
			||||||
		Reference in New Issue
	
	Block a user