Skip to content

Commit

Permalink
Rewrite remote to use GITHUB_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
gavlyukovskiy committed Jul 13, 2020
1 parent fcb93a1 commit 45c4ced
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ scmVersion {
}
if (System.getenv("GITHUB_ACTIONS") == "true") {
with(repository) {
customPassword = System.getenv("GITHUB_TOKEN");
val githubToken = System.getenv("GITHUB_TOKEN")
remote = "https://$githubToken@github.com/gavlyukovskiy/spring-boot-data-source-decorator.git"
}
}
}
Expand Down Expand Up @@ -182,7 +183,11 @@ tasks {
if (!project.hasProperty("release.version")) {
errors.add("'-Prelease.version' must be set")
}
if (System.getenv("GITHUB_ACTIONS") != "true") {
if (System.getenv("GITHUB_ACTIONS") == "true") {
if (System.getenv("GITHUB_TOKEN") == null) {
errors.add("'GITHUB_TOKEN' must be passed intp Github Actions workflow")
}
} else {
if (!project.hasProperty("release.customUsername")) {
errors.add("'-Prelease.customUsername' must be set")
}
Expand Down

0 comments on commit 45c4ced

Please sign in to comment.