File tree 2 files changed +58
-42
lines changed
2 files changed +58
-42
lines changed Original file line number Diff line number Diff line change
1
+ name : Releases
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ release :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+
13
+ - name : Set up JDK 1.8
14
+ uses : actions/setup-java@v1
15
+ with :
16
+ java-version : 1.8
17
+
18
+ - name : Grant execute permission for gradlew
19
+ run : chmod +x gradlew
20
+
21
+ - name : Build with Gradle
22
+ run : ./gradlew build
23
+
24
+ - name : Release
25
+ uses : fnkr/github-action-ghr@v1
26
+ env :
27
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28
+ GHR_PATH : " build/libs/"
29
+
30
+ - name : Generate Docker metadata
31
+ id : meta
32
+ uses : docker/metadata-action@v3
33
+ with :
34
+ images : |
35
+ criteord/cassandra_exporter
36
+ tags : |
37
+ type=ref,event=branch
38
+ type=semver,pattern={{version}}
39
+ type=semver,pattern={{major}}.{{minor}}
40
+ flavor : |
41
+ latest=true
42
+
43
+ - name : Login to Docker Hub
44
+ uses : docker/login-action@v1
45
+ with :
46
+ username : ${{ secrets.DOCKER_USERNAME }}
47
+ password : ${{ secrets.DOCKER_PASSWORD }}
48
+
49
+ - name : Set up Docker Buildx
50
+ uses : docker/setup-buildx-action@v1
51
+
52
+ - name : Build and push
53
+ uses : docker/build-push-action@v2
54
+ with :
55
+ context : .
56
+ file : docker/Dockerfile
57
+ push : true
58
+ tags : ${{ steps.meta.outputs.tags }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments