mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-11-24 02:21:02 -05:00
install dependencies before anything else
This commit is contained in:
parent
5d8a0e54b5
commit
60af48d02b
1 changed files with 8 additions and 4 deletions
|
@ -49,10 +49,6 @@ function api() {
|
||||||
shift
|
shift
|
||||||
token=$1
|
token=$1
|
||||||
|
|
||||||
if ! which jq curl > /dev/null ; then
|
|
||||||
apt-get -qq install -y jq curl
|
|
||||||
fi
|
|
||||||
|
|
||||||
curl --fail -X $method -sS -H "Content-Type: application/json" -H "Authorization: token $token" "$@" $url/api/v1/$path
|
curl --fail -X $method -sS -H "Content-Type: application/json" -H "Authorization: token $token" "$@" $url/api/v1/$path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,4 +155,12 @@ function push_self_action() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dependencies() {
|
||||||
|
if ! which jq curl > /dev/null ; then
|
||||||
|
apt-get -qq install -y jq curl
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies
|
||||||
|
|
||||||
"$@"
|
"$@"
|
||||||
|
|
Loading…
Reference in a new issue