File tree 3 files changed +61
-59
lines changed
3 files changed +61
-59
lines changed Original file line number Diff line number Diff line change
1
+ name : artifact
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main" ]
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : checkout code
12
+ uses : actions/checkout@v3
13
+
14
+ - name : setup java
15
+ uses : actions/setup-java@v3
16
+ with :
17
+ distribution : ' temurin'
18
+ java-version : ' 17'
19
+
20
+ - name : cache maven dependencies
21
+ uses : actions/cache@v3
22
+ with :
23
+ path : ~/.m2/repository
24
+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
25
+ restore-keys : |
26
+ ${{ runner.os }}-maven
27
+
28
+ - name : build JAR
29
+ run : mvn clean package -DskipTests
30
+
31
+ - name : upload maven artifact
32
+ uses : actions/upload-artifact@v4
33
+ with :
34
+ name : API-Catalogo
35
+ path : target/*.jar
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : docker-hub
2
+
3
+ on :
4
+ workflow_run :
5
+ workflows : ["artifact"]
6
+ types :
7
+ - success
8
+
9
+ jobs :
10
+ docker :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : checkout code
14
+ uses : actions/checkout@v4
15
+
16
+ - name : login DockerHub
17
+ uses : docker/login-action@v3
18
+ with :
19
+ username : ${{ secrets.DOCKER_USERNAME }}
20
+ password : ${{ secrets.DOCKER_PASSWORD }}
21
+
22
+ - name : Build and push
23
+ uses : docker/build-push-action@v6
24
+ with :
25
+ push : true
26
+ tags : ${{ secrets.DOCKER_USERNAME }}/api-catalogo:latest
You can’t perform that action at this time.
0 commit comments