Add gpr auth to action
This commit is contained in:
parent
bbe9954cb7
commit
41d6ebcf03
5
.github/workflows/android.yml
vendored
5
.github/workflows/android.yml
vendored
@ -12,6 +12,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Set up environment variables
|
||||
run: |
|
||||
echo "GPR_USER=${{ github.actor }}" >> $GITHUB_ENV
|
||||
echo "GPR_KEY=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- name: set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
|
||||
@ -16,8 +16,11 @@ pluginManagement {
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
val gprUser = getLocalProperty("gpr.user")
|
||||
val gprKey = getLocalProperty("gpr.key")
|
||||
|
||||
val env: MutableMap<String, String> = System.getenv()
|
||||
val gprUser = if(env.containsKey("GPR_USER")) env["GPR_USER"] else getLocalProperty("gpr.user")
|
||||
val gprKey = if(env.containsKey("GPR_KEY")) env["GPR_KEY"] else getLocalProperty("gpr.key")
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user