Example code for blog post: https://zoltanaltfatter.com/2020/04/10/semantic-versioning-with-jgitver/
$ http :8080/actuator/info
{
"app": {
"description": "jgitver calculates a project semver compatible version from a git repository",
"name": "jgitver-demo"
},
"build": {
"artifact": "jgitver-demo",
"group": "com.example",
"name": "jgitver-demo",
"time": "2020-04-09T20:38:44.439Z",
"version": "0.0.2-1"
},
"git": {
"branch": "master",
"commit": {
"id": "de5248a",
"time": "2020-03-07T21:46:14Z"
}
}
}
GitHub Registry (Private):
- Create a GitHub Personal Access token
- Save it in ~/GH_TOKEN.txt
$ cat ~/GH_TOKEN.txt | docker login -u altfatterz docker.pkg.github.com --password-stdin
$ docker tag IMAGE_ID docker.pkg.github.com/altfatterz/two-step-login/IMAGE_NAME:VERSION
$ docker push docker.pkg.github.com/altfatterz/two-step-login/IMAGE_NAME:VERSION