File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -49,16 +49,14 @@ jobs:
4949    - name : Push image 
5050      run : docker push --all-tags ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 
5151
52-     - uses :  actions/github-script@v7 
52+     - name :  Post PR comment with image info 
5353      if : ${{ github.event_name == 'pull_request' }} 
54-       with :
55-         script : | 
56-             github.rest.issues.createComment({ 
57-                 issue_number: context.issue.number, 
58-                 owner: context.repo.owner, 
59-                 repo: context.repo.repo, 
60-                 body: `To run the Eureka server image built for this pull request: 
61-             \`\`\`bash 
62-             docker run --rm -d --pull=always -p 8761:8761 --name eureka-pr steeltoe.azurecr.io/eureka-server:pr-${{ github.event.number }} 
63-             \`\`\`` 
64-             }) 
54+       run : | 
55+         gh pr comment $PR_NUMBER --edit-last --create-if-none --body "To run the Eureka Server image built for this pull request: 
56+               \`\`\`bash 
57+               docker run --rm -d --pull=always -p 8761:8761 --name eureka-pr steeltoe.azurecr.io/eureka-server:pr-$PR_NUMBER 
58+               \`\`\`" 
59+        shell : bash 
60+       env :
61+         GH_TOKEN : ${{ secrets.GITHUB_TOKEN }} 
62+         PR_NUMBER : ${{ github.event.number }} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments