File tree Expand file tree Collapse file tree 2 files changed +35
-4
lines changed Expand file tree Collapse file tree 2 files changed +35
-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,41 @@ 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+ arch=$(dpkg --print-architecture | sed 's/armhf/arm/g')
44+ sha=$(wget -qO- \
45+ https://dl.min.io/client/mc/release/linux-"${arch}"/mc.sha256sum \
46+ | awk '{print $1}')
47+ echo "sha256=$sha" >> "$GITHUB_OUTPUT"
48+ shell : bash
49+
50+ - name : Cache mc binary
51+ id : cache-mc
52+ if : ${{ steps.check-mc.outputs.exists == 'false' }}
53+ uses : actions/cache@v4
54+ with :
55+ path : /usr/local/bin/mc
56+ key : mc-${{ steps.mc-sha.outputs.sha256 }}
57+
2958 - name : Setup mc
3059 working-directory : /usr/local/bin
60+ if : >-
61+ ${{ steps.check-mc.outputs.exists == 'false'
62+ && steps.cache-mc.outputs.cache-hit != 'true' }}
3163 run : |
32- [ -n "$(which mc)" ] && exit 0
3364 arch=$(dpkg --print-architecture | sed 's/armhf/arm/g')
3465 sudo wget --progres=dot:binary \
3566 "https://dl.min.io/client/mc/release/linux-${arch}/mc"
You can’t perform that action at this time.
0 commit comments