Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
access-key: ${{ secrets.AWS_ACCESS_KEY }}
secret-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
local-path: "./files/test1.txt"
remote-path: "github/minio/"
remote-path: "nbfc-assets/github/minio/"

- name: Test wildcard with extension upload
uses: ./
Expand All @@ -31,7 +31,7 @@ jobs:
access-key: ${{ secrets.AWS_ACCESS_KEY }}
secret-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
local-path: "./files/*.txt"
remote-path: "github/minio/"
remote-path: "nbfc-assets/github/minio/"

- name: Test wildcard upload
uses: ./
Expand All @@ -40,4 +40,4 @@ jobs:
access-key: ${{ secrets.AWS_ACCESS_KEY }}
secret-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
local-path: "./files/*"
remote-path: "github/minio/"
remote-path: "nbfc-assets/github/minio/"
32 changes: 31 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,40 @@ inputs:
runs:
using: composite
steps:
- name: Check if mc is installed
id: check-mc
run: |
if [[ -n "$(which mc)" ]]; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
shell: bash

- name: Download latest mc SHA256
id: mc-sha
if: ${{ steps.check-mc.outputs.exists == 'false' }}
run: |
sha=$(wget -qO- \
https://dl.min.io/client/mc/release/linux-amd64/mc.sha256sum \
| awk '{print $1}')
echo "sha256=$sha" >> "$GITHUB_OUTPUT"
shell: bash

- name: Cache mc binary
id: cache-mc
if: ${{ steps.check-mc.outputs.exists == 'false' }}
uses: actions/cache@v4
with:
path: /usr/local/bin/mc
key: mc-${{ steps.mc-sha.outputs.sha256 }}

- name: Setup mc
working-directory: /usr/local/bin
if: >-
${{ steps.check-mc.outputs.exists == 'false'
&& steps.cache-mc.outputs.cache-hit != 'true' }}
run: |
[ -n "$(which mc)" ] && exit 0
arch=$(dpkg --print-architecture | sed 's/armhf/arm/g')
sudo wget --progres=dot:binary \
"https://dl.min.io/client/mc/release/linux-${arch}/mc"
Expand Down