mirror of
https://codeberg.org/moonleay/Gimbal.git
synced 2025-04-11 08:54:15 +02:00
ci: log hashed accessToken hashed
Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
parent
3d6bd1ef75
commit
fd866855eb
1 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* 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.ProjectSettings
|
||||||
import org.jetbrains.gradle.ext.TaskTriggersConfig
|
import org.jetbrains.gradle.ext.TaskTriggersConfig
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
@ -190,12 +191,13 @@ publishing {
|
||||||
val repoOwner = System.getenv("GITHUB_REPOSITORY_OWNER")
|
val repoOwner = System.getenv("GITHUB_REPOSITORY_OWNER")
|
||||||
val serverUrl = System.getenv("GITHUB_SERVER_URL")
|
val serverUrl = System.getenv("GITHUB_SERVER_URL")
|
||||||
val accessToken = System.getenv("GITHUB_TOKEN")
|
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")
|
||||||
authentication {
|
authentication {
|
||||||
create("header", HttpHeaderAuthentication::class.java) {
|
create("header", HttpHeaderAuthentication::class.java) {
|
||||||
credentials(HttpHeaderCredentials::class) {
|
credentials(HttpHeaderCredentials::class) {
|
||||||
name = "Authorization"
|
name = "Authorization"
|
||||||
value = "Bearer $accessToken"
|
value = "token $accessToken"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue