File tree Expand file tree Collapse file tree 2 files changed +34
-4
lines changed Expand file tree Collapse file tree 2 files changed +34
-4
lines changed Original file line number Diff line number Diff line change 2222          access-key : ${{ secrets.AWS_ACCESS_KEY }} 
2323          secret-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }} 
2424          local-path : " ./files/test1.txt" 
25-           remote-path : " github/minio/" 
25+           remote-path : " nbfc-assets/ github/minio/" 
2626
2727      - name : Test wildcard with extension upload 
2828        uses : ./ 
3131          access-key : ${{ secrets.AWS_ACCESS_KEY }} 
3232          secret-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }} 
3333          local-path : " ./files/*.txt" 
34-           remote-path : " github/minio/" 
34+           remote-path : " nbfc-assets/ github/minio/" 
3535
3636      - name : Test wildcard upload 
3737        uses : ./ 
4040          access-key : ${{ secrets.AWS_ACCESS_KEY }} 
4141          secret-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }} 
4242          local-path : " ./files/*" 
43-           remote-path : " github/minio/" 
43+           remote-path : " nbfc-assets/ github/minio/" 
Original file line number Diff line number Diff line change @@ -26,10 +26,40 @@ inputs:
2626runs :
2727  using : composite 
2828  steps :
29+     - name : Check if mc is installed 
30+       id : check-mc 
31+       run : | 
32+         if [[ -n "$(which mc)" ]]; then 
33+           echo "exists=true" >> "$GITHUB_OUTPUT" 
34+         else 
35+           echo "exists=false" >> "$GITHUB_OUTPUT" 
36+         fi 
37+ shell : bash 
38+ 
39+     - name : Download latest mc SHA256 
40+       id : mc-sha 
41+       if : ${{ steps.check-mc.outputs.exists == 'false' }} 
42+       run : | 
43+         sha=$(wget -qO- \ 
44+           https://dl.min.io/client/mc/release/linux-amd64/mc.sha256sum \ 
45+           | awk '{print $1}') 
46+         echo "sha256=$sha" >> "$GITHUB_OUTPUT" 
47+ shell : bash 
48+ 
49+     - name : Cache mc binary 
50+       id : cache-mc 
51+       if : ${{ steps.check-mc.outputs.exists == 'false' }} 
52+       uses : actions/cache@v4 
53+       with :
54+         path : /usr/local/bin/mc 
55+         key : mc-${{ steps.mc-sha.outputs.sha256 }} 
56+ 
2957    - name : Setup mc 
3058      working-directory : /usr/local/bin 
59+       if : >- 
60+         ${{ steps.check-mc.outputs.exists == 'false' 
61+           && steps.cache-mc.outputs.cache-hit != 'true' }} 
3162run : | 
32-         [ -n "$(which mc)" ] && exit 0 
3363        arch=$(dpkg --print-architecture | sed 's/armhf/arm/g') 
3464        sudo wget --progres=dot:binary \ 
3565          "https://dl.min.io/client/mc/release/linux-${arch}/mc" 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments