From e8c495c5725a0218519d2b6c47ee0455abd4528e Mon Sep 17 00:00:00 2001 From: Phillipp Glanz <6745190+TheMeinerLP@users.noreply.github.com> Date: Tue, 13 Feb 2024 12:10:13 +0100 Subject: [PATCH] [#2] Add deploy username for gitlab --- .github/workflows/build.yml | 1 + build.gradle.kts | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d28ad2c46..8941356e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,7 @@ jobs: GITLAB_API_URL: ${{ secrets.GITLAB_API_URL }} GITLAB_PROJECT_ID: ${{ secrets.GITLAB_PROJECT_ID }} GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} + GITLAB_USERNAME: ${{ secrets.GITLAB_USERNAME }} steps: - name: Checkout Git Repository uses: actions/checkout@v3 diff --git a/build.gradle.kts b/build.gradle.kts index 9aa6f6f52..f6f3f1ebc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -108,12 +108,12 @@ allprojects { url = uri("$ciApiv4Url/projects/$projectId/packages/maven") // See Gradle docs for how to provide credentials to PasswordCredentials // https://docs.gradle.org/current/samples/sample_publishing_credentials.html - credentials(HttpHeaderCredentials::class) { - name = "Deploy-Token" - value = System.getenv("GITLAB_TOKEN") + credentials(PasswordCredentials::class) { + username = System.getenv("GITLAB_USERNAME") + password = System.getenv("GITLAB_TOKEN") } authentication { - create("header") + create("basic", BasicAuthentication::class) } } }