mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-12-26 06:42:17 -05:00
Merge pull request 'install dependencies before anything else' (#13) from earl-warren/setup-forgejo:wip-api into main
Reviewed-on: https://code.forgejo.org/actions/setup-forgejo/pulls/13 Reviewed-by: dachary <dachary@noreply.code.forgejo.org>
This commit is contained in:
commit
33c7a0c667
2 changed files with 9 additions and 5 deletions
|
@ -49,10 +49,6 @@ function api() {
|
|||
shift
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
"$@"
|
||||
|
|
|
@ -28,7 +28,7 @@ function run() {
|
|||
local image="$1"
|
||||
local version="$2"
|
||||
|
||||
if dpkg --compare-versions "$version" "lt" "1.19.0-3"; then
|
||||
if test "$version" != "1.19" && dpkg --compare-versions "$version" "lt" "1.19.0-3"; then
|
||||
actions_unit="actions.actions"
|
||||
else
|
||||
actions_unit="repo.actions"
|
||||
|
|
Loading…
Reference in a new issue