mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2025-07-01 21:43:43 +00:00
Allow downloading releases from private repos (#15)
Closes #14 Reviewed-on: https://code.forgejo.org/actions/forgejo-release/pulls/15 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org> Co-authored-by: benniekiss <benniekiss@noreply.code.forgejo.org> Co-committed-by: benniekiss <benniekiss@noreply.code.forgejo.org>
This commit is contained in:
parent
eb0fcc44a1
commit
de47e391d3
2 changed files with 8 additions and 2 deletions
|
@ -107,7 +107,7 @@ upload() {
|
|||
setup_api() {
|
||||
if ! which jq curl ; then
|
||||
apt-get -qq update
|
||||
apt-get install -y -qq jq curl wget
|
||||
apt-get install -y -qq jq curl
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ download() {
|
|||
cd $RELEASE_DIR
|
||||
api GET repos/$REPO/releases/tags/$TAG > $TMP_DIR/assets.json
|
||||
jq --raw-output '.assets[] | "\(.name) \(.browser_download_url)"' < $TMP_DIR/assets.json | while read name url ; do
|
||||
wget --quiet -O $name $url
|
||||
curl --fail -H "Authorization: token $TOKEN" -o $name -L $url
|
||||
done
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue