1- name : Build project
2- on : [ push ]
1+ name : Build
2+ on :
3+ push :
4+ branches :
5+ - master
6+ paths :
7+ - .github/**
8+ - openapi/**
9+ - client/**
10+ - integration-test/**
11+ - deploy/**
12+ - build.gradle
13+ - gradle.properties
14+
315jobs :
416 build :
517 name : Build
618 runs-on : ubuntu-latest
719 steps :
8- - uses : actions/checkout@v3
20+ - uses : actions/checkout@v4
921
10- - uses : actions/setup-java@v3
22+ - uses : actions/setup-java@v4
1123 with :
1224 distribution : " corretto"
1325 java-version : " 17"
1426 cache : " gradle"
1527
1628 - name : Install tflint
17- uses : terraform-linters/setup-tflint@v3
29+ uses : terraform-linters/setup-tflint@v4
1830
1931 - name : Validate
2032 uses : pre-commit/action@v3.0.0
2133
2234 - name : Build project
23- uses : eskatos/gradle-command-action@v2
24- with :
25- arguments : clean build
35+ run : ./gradlew clean build
2636
2737 - name : Upload Admin build
28- uses : actions/upload-artifact@v3
38+ uses : actions/upload-artifact@v4
2939 with :
3040 name : jar
3141 retention-days : 1
@@ -36,11 +46,11 @@ jobs:
3646 runs-on : ubuntu-latest
3747 needs : build
3848 steps :
39- - uses : actions/checkout@v3
49+ - uses : actions/checkout@v4
4050
4151 - uses : docker/setup-buildx-action@v2
4252
43- - uses : actions/download-artifact@v3
53+ - uses : actions/download-artifact@v4
4454 with :
4555 name : jar
4656 path : server/build/libs/
6070 cache : " gradle"
6171
6272 - name : Build project
63- uses : eskatos/gradle-command-action@v2
64- with :
65- arguments : :integration-test:integrationTest
73+ run : ./gradlew :integration-test:integrationTest
6674
6775 - name : Stop containers
6876 if : always()
7482 runs-on : ubuntu-latest
7583 needs : test
7684 steps :
77- - uses : actions/checkout@v3
85+ - uses : actions/checkout@v4
7886
7987 - uses : docker/setup-buildx-action@v2
8088
8492 username : ${{ secrets.DOCKER_HUB_USERNAME }}
8593 password : ${{ secrets.DOCKER_HUB_TOKEN }}
8694
87- - uses : actions/download-artifact@v3
95+ - uses : actions/download-artifact@v4
8896 with :
8997 name : jar
9098 path : server/build/libs/
@@ -93,8 +101,24 @@ jobs:
93101 timeout-minutes : 5
94102 run : docker compose build
95103
96- - name : Push images
97- run : docker compose push
104+ - name : Build and push
105+ uses : docker/build-push-action@v6
106+ with :
107+ context : .
108+ file : server/Dockerfile
109+ platforms : linux/amd64,linux/arm64
110+ tags : romanowalex/servers:${{ github.ref_name }}
111+ push : true
112+
113+ - name : Docker Hub Description
114+ uses : peter-evans/dockerhub-description@v4
115+ with :
116+ readme-filepath : Docker-README.md
117+ repository : romanowalex/openapi-generation
118+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
119+ password : ${{ secrets.DOCKER_HUB_TOKEN }}
120+ short-description : ${{ github.event.repository.description }}
121+ enable-url-completion : true
98122
99123 deploy :
100124 name : Deploy DigitalOcean app
@@ -103,7 +127,7 @@ jobs:
103127 environment :
104128 name : digitalocean
105129 steps :
106- - uses : actions/checkout@v3
130+ - uses : actions/checkout@v4
107131
108132 - name : Terraform deploy
109133 run : |
0 commit comments