mirror of
				https://github.com/MindWorkAI/AI-Studio.git
				synced 2025-11-04 04:00:21 +00:00 
			
		
		
		
	Integrated virus scan into release notes
This commit is contained in:
		
							parent
							
								
									2144c242a5
								
							
						
					
					
						commit
						1d15c483c3
					
				
							
								
								
									
										45
									
								
								.github/workflows/build-and-release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										45
									
								
								.github/workflows/build-and-release.yml
									
									
									
									
										vendored
									
									
								
							@ -784,6 +784,40 @@ jobs:
 | 
				
			|||||||
          - name: Display the content of the release folder
 | 
					          - name: Display the content of the release folder
 | 
				
			||||||
            run: ls -Rlhat $GITHUB_WORKSPACE/release/assets
 | 
					            run: ls -Rlhat $GITHUB_WORKSPACE/release/assets
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
 | 
					          - name: Scan for threats
 | 
				
			||||||
 | 
					            id: virus_total
 | 
				
			||||||
 | 
					            uses: crazy-max/ghaction-virustotal@v4
 | 
				
			||||||
 | 
					            with:
 | 
				
			||||||
 | 
					              vt_api_key: ${{ secrets.VIRUS_TOTAL_KEY }}
 | 
				
			||||||
 | 
					              files: $GITHUB_WORKSPACE/release/assets/*
 | 
				
			||||||
 | 
					              request_rate: 4
 | 
				
			||||||
 | 
					              vt_monitor: false
 | 
				
			||||||
 | 
					              github_token: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
 | 
					              update_release_body: true
 | 
				
			||||||
 | 
					              
 | 
				
			||||||
 | 
					          - name: Append scan results to changelog
 | 
				
			||||||
 | 
					            run: |
 | 
				
			||||||
 | 
					              changelog="${{ env.CHANGELOG }}"
 | 
				
			||||||
 | 
					              links="${{ steps.virus_total.outputs.analysis }}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              # Add the new Markdown section:
 | 
				
			||||||
 | 
					              changelog="$changelog\n\n## Virus scans"
 | 
				
			||||||
 | 
					              
 | 
				
			||||||
 | 
					              # Split the analysis output by comma:
 | 
				
			||||||
 | 
					              IFS=',' read -ra analysis_array <<< "$links"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              # Append each file and link to the changelog:
 | 
				
			||||||
 | 
					              for item in "${analysis_array[@]}"; do
 | 
				
			||||||
 | 
					                filename=$(echo $item | cut -d'=' -f1)
 | 
				
			||||||
 | 
					                link=$(echo $item | cut -d'=' -f2)
 | 
				
			||||||
 | 
					                changelog="$changelog\n- [$(basename $filename)]($link)"
 | 
				
			||||||
 | 
					              done
 | 
				
			||||||
 | 
					              
 | 
				
			||||||
 | 
					              # Export the modified changelog (using HEREDOC syntax for multi-line support):
 | 
				
			||||||
 | 
					              echo "CHANGELOG<<EOOOF" >> $GITHUB_ENV
 | 
				
			||||||
 | 
					              echo "$changelog" >> $GITHUB_ENV
 | 
				
			||||||
 | 
					              echo "EOOOF" >> $GITHUB_ENV
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
          - name: Create release
 | 
					          - name: Create release
 | 
				
			||||||
            uses: softprops/action-gh-release@v2
 | 
					            uses: softprops/action-gh-release@v2
 | 
				
			||||||
            with:
 | 
					            with:
 | 
				
			||||||
@ -792,13 +826,4 @@ jobs:
 | 
				
			|||||||
              name: "Release ${{ env.FORMATTED_VERSION }}"
 | 
					              name: "Release ${{ env.FORMATTED_VERSION }}"
 | 
				
			||||||
              fail_on_unmatched_files: true
 | 
					              fail_on_unmatched_files: true
 | 
				
			||||||
              files: |
 | 
					              files: |
 | 
				
			||||||
                $GITHUB_WORKSPACE/release/assets/*
 | 
					                $GITHUB_WORKSPACE/release/assets/*
 | 
				
			||||||
                
 | 
					 | 
				
			||||||
          - name: Scan for threats
 | 
					 | 
				
			||||||
            uses: crazy-max/ghaction-virustotal@v4
 | 
					 | 
				
			||||||
            with:
 | 
					 | 
				
			||||||
              vt_api_key: ${{ secrets.VIRUS_TOTAL_KEY }}
 | 
					 | 
				
			||||||
              files: $GITHUB_WORKSPACE/release/assets/*
 | 
					 | 
				
			||||||
              request_rate: 4
 | 
					 | 
				
			||||||
              vt_monitor: false
 | 
					 | 
				
			||||||
              update_release_body: true
 | 
					 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user