Skip to content

Enable Maven deploy on push for CI using GitHub Actions#25

Merged
karllessard merged 2 commits intotensorflow:masterfrom
saudet:add-maven-deploy
Feb 8, 2020
Merged

Enable Maven deploy on push for CI using GitHub Actions#25
karllessard merged 2 commits intotensorflow:masterfrom
saudet:add-maven-deploy

Conversation

@saudet
Copy link
Contributor

@saudet saudet commented Jan 30, 2020

Also fix build on Windows for TensorFlow 2.1.0
(However, it still fails on GitHub Actions as explained in pull #8.)

With these changes, builds triggered by a git push are executed with mvn clean deploy -Possrh ...
It looks like this: https://github.com/saudet/tensorflow-java/actions/runs/32841274
(Builds triggered by pull requests remain with mvn clean install ...)

To make that work in any given repository, the CI_DEPLOY_USERNAME and CI_DEPLOY_PASSWORD secrets need to be set to valid credentials from https://oss.sonatype.org/ and the org.tensorflow domain: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets @sjamesr Does this sound reasonable?

But that's it! We're now getting snapshots deployed that end users can start testing immediately:
https://oss.sonatype.org/content/repositories/snapshots/org/tensorflow/

/cc @vb216

Also fix build on Windows for TensorFlow 2.1.0
Copy link
Collaborator

@karllessard karllessard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @saudet ! @sjamesr can you check this out and create those two secret variables before merging so we can give it a try?

@karllessard
Copy link
Collaborator

Meanwhile @saudet , is it possible to modify the script to make it more "green efficient" ? :)

I suggest that we trigger the build only for events on the master branch (so pushes on master and pull requests into master).

Also, is there a way to disable the script automatically on forks, so the CI is only triggered on github.com/tensorflow/java specifically?

@saudet
Copy link
Contributor Author

saudet commented Feb 4, 2020

For the master branch, sure. About forks, I'm not seeing anything, other than disabling it in the settings:
https://github.community/t5/GitHub-Actions/How-to-turn-off-GitHub-Actions-for-a-repo/td-p/38106

@karllessard
Copy link
Collaborator

For the master branch, sure.

Ok let's add the branch filter at least for now

Copy link
Collaborator

@karllessard karllessard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OSS credentials are set, just waiting for the branch filter

@karllessard karllessard merged commit 1261766 into tensorflow:master Feb 8, 2020
@karllessard
Copy link
Collaborator

Ok @saudet, it looks like it is working, please make sure that you delete your secrets from your fork otherwise you might override accidentally the artifacts issued from this repo. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants