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) } } }