Skip to content

Commit

Permalink
re-add github-environment (#48)
Browse files Browse the repository at this point in the history
* re-add github-environment

* configure GitHub Packages user/pass
  • Loading branch information
aSemy authored Dec 22, 2023
1 parent 398d686 commit 6542309
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/run_gradle_task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ on:
description: "The repository reference to checkout"
required: false
type: string
github-environment:
description: "GitHub Environment name"
required: false
type: string
github-environment-url:
description: "GitHub Environment display URL"
required: false
type: string
workflow_call:
inputs:
gradle-task:
Expand All @@ -32,6 +40,14 @@ on:
description: "The repository reference to checkout"
required: false
type: string
github-environment:
description: "GitHub Environment name"
required: false
type: string
github-environment-url:
description: "GitHub Environment display URL"
required: false
type: string


concurrency:
Expand All @@ -51,6 +67,9 @@ jobs:
runs-on: ${{ inputs.runs-on }}
name: "./gradlew ${{ inputs.gradle-task}} @ ${{ inputs.runs-on }}"
timeout-minutes: 60
environment:
name: ${{ inputs.github-environment }}
url: ${{ inputs.github-environment-url }}
steps:

### Gradle task ###
Expand Down Expand Up @@ -79,6 +98,8 @@ jobs:
"ORG_GRADLE_PROJECT_signing.password": ${{ secrets.SONATYPE_SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeRepositoryUsername: ${{ secrets.SONATYPE_REPO_USERNAME }}
ORG_GRADLE_PROJECT_sonatypeRepositoryPassword: ${{ secrets.SONATYPE_REPO_PASSWORD }}
ORG_GRADLE_PROJECT_gitHubPackagesRepositoryUsername: ${{ env.USERNAME }}
ORG_GRADLE_PROJECT_gitHubPackagesRepositoryPassword: ${{ env.TOKEN }}

- name: Upload build reports
if: failure()
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/run_publish_maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
--stacktrace
--no-configuration-cache
--no-parallel
github-environment: sonatype-publish
github-environment-url: https://s01.oss.sonatype.org/
checkout-ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ abstract class KotkaPublishingSettings @Inject constructor(
)

val gitHubPackagesCredentials: Provider<Action<PasswordCredentials>> =
providers.credentialsAction("GitHubPackages")
providers.credentialsAction("gitHubPackages")

val sonatypeRepositoryCredentials: Provider<Action<PasswordCredentials>> =
providers.credentialsAction("sonatypeRepository")
Expand Down

0 comments on commit 6542309

Please sign in to comment.