Skip to content

Commit

Permalink
Merge commit '9b2c0b0f86c0548c5756404a14f1e3e8e1eede17' into template
Browse files Browse the repository at this point in the history
  • Loading branch information
Atry committed Nov 22, 2019
2 parents 7d7fcc8 + 9b2c0b0 commit f6b6738
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ deploy:
skip_cleanup: true
on:
all_branches: true
condition: $GITHUB_PERSONAL_ACCESS_TOKEN
condition: $SECRET_GIST
7 changes: 2 additions & 5 deletions secret.sbt
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
lazy val secret = {
for (token <- sys.env.get("GITHUB_PERSONAL_ACCESS_TOKEN")) yield {
for (gist <- sys.env.get("SECRET_GIST")) yield {
val secret = project.settings(publish / skip := true).in {
val secretDirectory = file(sourcecode.File()).getParentFile / "secret"
IO.delete(secretDirectory)
org.eclipse.jgit.api.Git
.cloneRepository()
.setURI("https://github.com/ThoughtWorksInc/tw-data-china-continuous-delivery-password.git")
.setURI(gist)
.setDirectory(secretDirectory)
.setCredentialsProvider(
new org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider(token, "")
)
.call()
.close()
secretDirectory
Expand Down

0 comments on commit f6b6738

Please sign in to comment.