File tree Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 4848      - name : Update apps' package deps 
4949        shell : Rscript {0} 
5050        run : | 
51+           # Resolves error of `  trying to use CRAN without setting a mirror` 
52+           # https://github.com/r-lib/actions/blob/5e080d8d4241b4e7ed3834b113a6fa643d3f1351/setup-r/src/installer.ts#L600 
53+           options(repos = c(CRAN="https://cran.rstudio.com/")) 
5154          source("inst/gha/data-apps-deps-update.R") 
5255          update_apps_deps() 
5356
Original file line number Diff line number Diff line change @@ -273,20 +273,25 @@ jobs:
273273          git add __test_results/ 
274274          git commit -m "Add test results for ${{steps.gha_branch.outputs.name}}" 
275275
276-           # attempt  to push until success. Allow for 15 attempts 
276+           # Attempt  to push until success. Allow for 15 attempts 
277277          counter=0 
278-           git pull origin _test_results 
279-           until git push "https://$GITHUB_ACTOR:${{secrets.GITHUB_TOKEN}}@github.com/rstudio/shinycoreci.git" _test_results 
280-           do 
281-             # wait 5-15 seconds to avoid deadlock 
282-             sleep $[ ($RANDOM % 10) + 5 ]s 
278+           while true; do 
279+             git pull --rebase origin _test_results 
283280
284-             [[ counter -gt 15 ]] && echo "Too many attempts!" && exit 1 
281+             # Capture push status and do not exit action 
282+             PUSH_STATUS=0 
283+             output=$(git push "https://$GITHUB_ACTOR:${{secrets.GITHUB_TOKEN}}@github.com/rstudio/shinycoreci.git" _test_results) && PUSH_STATUS=$? || PUSH_STATUS=$? 
284+ 
285+             # If push was successful, exit loop 
286+             if [ "$PUSH_STATUS" = 0 ]; then 
287+                 break; # break `while true` loop 
288+             fi 
289+ 
290+             # Wait 5-15 seconds to avoid deadlock 
291+             sleep $[ ($RANDOM % 10) + 5 ]s 
285292            ((counter++)) 
293+             [[ counter -gt 15 ]] && echo "Too many attempts!" && exit 1 
286294            echo "Push failed. Trying again. Try #$counter" 
287- 
288-             # pull again to have the latest 
289-             git pull origin _test_results 
290295          done 
291296
292297          git checkout ${{ steps.current_branch.outputs.name }} 
Original file line number Diff line number Diff line change @@ -60,5 +60,6 @@ server <- function(input, output) {
6060
6161}
6262
63+ 
6364#  Create Shiny app ----
6465shinyApp(ui  =  ui , server  =  server )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments