Add GitHub Actions workflow for automatic file listing updates
This commit is contained in:
		
							parent
							
								
									89f9ae4bef
								
							
						
					
					
						commit
						237e48b86b
					
				
							
								
								
									
										33
									
								
								.gitea/workflows/auto_list.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								.gitea/workflows/auto_list.yml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,33 @@ | |||||||
|  | --- | ||||||
|  | jobs: | ||||||
|  |   update-list: | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     steps: | ||||||
|  |       - name: Checkout repository | ||||||
|  |         uses: actions/checkout@v2 | ||||||
|  |       - name: Set up Python | ||||||
|  |         uses: actions/setup-python@v2 | ||||||
|  |         with: | ||||||
|  |           python-version: 3.x | ||||||
|  |       - name: Install dependencies | ||||||
|  |         run: | | ||||||
|  |           python -m pip install --upgrade pip | ||||||
|  | 
 | ||||||
|  |       - name: Run AutoIndex script | ||||||
|  |         run: | | ||||||
|  |           python torrents/AutoIndex.py | ||||||
|  | 
 | ||||||
|  |       - name: Commit changes | ||||||
|  |         run: | | ||||||
|  |           git config --global user.name 'Gitea Bot' | ||||||
|  |           git config --global user.email 'bot@example.com' | ||||||
|  |           git add readme.md | ||||||
|  |           git commit -m 'Update file listing' | ||||||
|  |           git push | ||||||
|  | name: Auto List Update | ||||||
|  | 'on': | ||||||
|  |   push: | ||||||
|  |     branches: | ||||||
|  |       - main | ||||||
|  |     paths: | ||||||
|  |       - torrents/** | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user