mirror of
				https://github.com/telekom-security/tpotce.git
				synced 2025-10-30 20:12:53 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			49 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: "Check Basic Support Info"
 | |
| 
 | |
| on:
 | |
|   issues:
 | |
|     types: [opened, edited]
 | |
| 
 | |
| permissions:
 | |
|   issues: write
 | |
|   contents: read
 | |
| 
 | |
| jobs:
 | |
|   check-issue:
 | |
|     runs-on: ubuntu-latest
 | |
| 
 | |
|     steps:
 | |
|     - name: Check out the repository
 | |
|       uses: actions/checkout@v4
 | |
| 
 | |
|     - name: Install jq
 | |
|       run: sudo apt-get install jq -y
 | |
| 
 | |
|     - name: Check issue for basic support info
 | |
|       id: check_issue
 | |
|       run: |
 | |
|         REQUIRED_INFO=("What OS are you T-Pot running on?" "What is the version of the OS" "What T-Pot version are you currently using" "What architecture are you running on" "Review the \`~/install_tpot.log\`" "How long has your installation been running?" "Did you install upgrades, packages or use the update script?" "Did you modify any scripts or configs?" "Please provide a screenshot of \`htop\` and \`docker stats\`." "How much free disk space is available" "What is the current container status" "What is the status of the T-Pot service" "What ports are being occupied?")
 | |
| 
 | |
|         ISSUE_BODY=$(cat $GITHUB_EVENT_PATH | jq -r '.issue.body')
 | |
|         MISSING_INFO=()
 | |
|         
 | |
|         for info in "${REQUIRED_INFO[@]}"; do
 | |
|           if [[ "$ISSUE_BODY" != *"$info"* ]]; then
 | |
|             MISSING_INFO+=("$info")
 | |
|           fi
 | |
|         done
 | |
|         
 | |
|         if [ ${#MISSING_INFO[@]} -ne 0 ]; then
 | |
|           echo "missing=true" >> $GITHUB_ENV
 | |
|         else
 | |
|           echo "missing=false" >> $GITHUB_ENV
 | |
|         fi        
 | |
| 
 | |
|     - name: Add "no basic support info" label if necessary
 | |
|       if: env.missing == 'true'
 | |
|       run: gh issue edit "$NUMBER" --add-label "$LABELS"
 | |
|       env:
 | |
|         GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | |
|         GH_REPO: ${{ github.repository }}
 | |
|         NUMBER: ${{ github.event.issue.number }}
 | |
|         LABELS: no basic support info
 | 
