Add release monitoring
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Build on Commit / build-and-push-image (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Build on Commit / build-and-push-image (push) Has been cancelled
				
			This commit is contained in:
		
							
								
								
									
										33
									
								
								.gitea/workflows/monitor.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								.gitea/workflows/monitor.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
name: Get latest release version
 | 
			
		||||
on:
 | 
			
		||||
  schedule:
 | 
			
		||||
    - cron: "30 * * * *"
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
  MONITOR_URL: "https://api.github.com/repos/pterodactyl/wings/releases/latest"
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  get-version:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.REPO_MOD_TOKEN }}
 | 
			
		||||
      - name: Prepare the container
 | 
			
		||||
        run: apt-get update && apt-get --no-install-recommends -y install jq
 | 
			
		||||
      - name: Fetch release version
 | 
			
		||||
        id: version-check
 | 
			
		||||
        run: |
 | 
			
		||||
          VERSION_TAG=$(curl -sL $MONITOR_URL | jq -r .tag_name)
 | 
			
		||||
          echo "$VERSION_TAG" > release-versions/latest.txt
 | 
			
		||||
          echo ::set-output name=version::"$VERSION_TAG"
 | 
			
		||||
      - name: Check for modified files
 | 
			
		||||
        id: git-check
 | 
			
		||||
        run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
 | 
			
		||||
      - name: Commit latest release version
 | 
			
		||||
        if: steps.git-check.outputs.modified == 'true'
 | 
			
		||||
        run: |
 | 
			
		||||
          git config --global user.name 'Actions'
 | 
			
		||||
          git config --global user.email 'noreply@taco.quest'
 | 
			
		||||
          git commit -am "Trigger new release autobuild for ${{ steps.version-check.outputs.version }}"
 | 
			
		||||
          git push
 | 
			
		||||
		Reference in New Issue
	
	Block a user