Skip to content

Commit

Permalink
Update download.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jackalcooper authored Aug 8, 2023
1 parent c23b576 commit ff43f81
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
default: "oss://oneflow-static/downloads"
required: false
description: "path to put file"
filename:
default: ""
required: false
description: "rename file"
jobs:
download:
runs-on: ubuntu-latest
Expand All @@ -26,6 +30,14 @@ jobs:
export PATH=$PATH:$HOME/bin
ossutil64 config -e oss-cn-beijing.aliyuncs.com -i ${OSS_ACCESS_KEY_ID} -k ${OSS_ACCESS_KEY_SECRET} -L EN -c $HOME/.ossutilconfig
wget ${{ github.event.inputs.url }}
filename=$(basename "${{ github.event.inputs.url }}")
filename_input=${{ github.event.inputs.filename }}
if [[ -z "$filename_input" ]]; then
echo "using filename from url: ${filename}"
else
filename="${filename_input}"
echo "setting filename: ${filename}"
fi
wget ${{ github.event.inputs.url }} -O ${filename}
ossutil64 --update cp "${filename}" "${{ github.event.inputs.ossPath }}/${filename}"

0 comments on commit ff43f81

Please sign in to comment.