ci: moved to api endpoint again

Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
moonleay 2024-05-07 20:15:26 +02:00
parent fd866855eb
commit 46f4bc8289
Signed by: moonleay
GPG key ID: 82667543CCD715FB

View file

@ -16,7 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import org.gradle.internal.impldep.org.apache.commons.codec.digest.DigestUtils
import org.jetbrains.gradle.ext.ProjectSettings
import org.jetbrains.gradle.ext.TaskTriggersConfig
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@ -190,9 +189,10 @@ publishing {
name = "Codeberg"
val repoOwner = System.getenv("GITHUB_REPOSITORY_OWNER")
val serverUrl = System.getenv("GITHUB_SERVER_URL")
val apiUrl = System.getenv("GITHUB_API_URL")
val accessToken = System.getenv("GITHUB_TOKEN")
println("acT hashed: ${DigestUtils.sha256Hex(accessToken)}")
url = uri("$serverUrl/api/packages/$repoOwner/maven")
// url = uri("$serverUrl/api/packages/$repoOwner/maven")
url = uri("$apiUrl/packages/$repoOwner/maven")
authentication {
create("header", HttpHeaderAuthentication::class.java) {
credentials(HttpHeaderCredentials::class) {