mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-12-26 06:42:17 -05:00
add scope to the admin token
This commit is contained in:
parent
c63c206b24
commit
ba6467a698
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ function setup() {
|
|||
else
|
||||
wait_for docker exec --user 1000 forgejo forgejo admin user create --admin --username "$user" --password "$password" --email "$user@example.com"
|
||||
fi
|
||||
docker exec --user 1000 forgejo forgejo admin user generate-access-token -u $user --raw > forgejo-token
|
||||
docker exec --user 1000 forgejo forgejo admin user generate-access-token -u $user --raw --scopes 'all,sudo' > forgejo-token
|
||||
( echo -n 'Authorization: token ' ; cat forgejo-token ) > forgejo-header
|
||||
( echo "#!/bin/sh" ; echo 'curl -sS -H "Content-Type: application/json" -H @'$(pwd)/forgejo-header' "$@"' ) > forgejo-api && chmod +x forgejo-api
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue