mirror of
https://codeberg.org/moonleay/Gimbal.git
synced 2025-06-06 08:26:16 +02:00
ci: fixed auth header for upload
Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
parent
3f8673cadb
commit
6862174aee
1 changed files with 2 additions and 3 deletions
|
@ -186,15 +186,14 @@ publishing {
|
||||||
repositories {
|
repositories {
|
||||||
if (System.getenv("CI") != null) {
|
if (System.getenv("CI") != null) {
|
||||||
maven {
|
maven {
|
||||||
name = "Forgejo"
|
name = "Codeberg"
|
||||||
val repoOwner = System.getenv("GITHUB_REPOSITORY_OWNER")
|
val repoOwner = System.getenv("GITHUB_REPOSITORY_OWNER")
|
||||||
// val apiEndpoint = System.getenv("GITHUB_API_URL")
|
|
||||||
val serverUrl = System.getenv("GITHUB_SERVER_URL")
|
val serverUrl = System.getenv("GITHUB_SERVER_URL")
|
||||||
url = uri("$serverUrl/api/packages/$repoOwner/maven")
|
url = uri("$serverUrl/api/packages/$repoOwner/maven")
|
||||||
authentication {
|
authentication {
|
||||||
create("header", HttpHeaderAuthentication::class.java) {
|
create("header", HttpHeaderAuthentication::class.java) {
|
||||||
val accessToken = System.getenv("GITHUB_TOKEN")
|
val accessToken = System.getenv("GITHUB_TOKEN")
|
||||||
credentials(HttpHeaderCredentials::class.java) {
|
credentials(HttpHeaderCredentials::class) {
|
||||||
name = "Authorization"
|
name = "Authorization"
|
||||||
value = "token $accessToken"
|
value = "token $accessToken"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue