File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ name: "pre-release"
44on :
55 push :
66 branches :
7- - " * "
7+ - " main "
88
99jobs :
1010 pre-release :
Original file line number Diff line number Diff line change 2828 with :
2929 username : ${{ secrets.DOCKER_HUB_USERNAME }}
3030 password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
31- - name : Build Docker Image
32- run : mvn spring-boot:build-image -Pdocker -DskipTests
33- - name : Docker metadata
34- id : metadata
35- uses : docker/metadata-action@v3
36- with :
37- images : dedicatedcode/reitti
38- tags : |
39- type=semver,pattern={{version}}
40- type=semver,pattern={{major}}.{{minor}}
41- type=raw,value={{sha}},enable=${{ github.ref_type != 'tag' }}
42- - name : Tag image
43- run : docker image tag dedicatedcode/reitti ${{ inputs.tags }}
44- with :
45- tags : ${{ steps.metadata.outputs.tags }}
46- - name : Push images
47- run : docker push --all-tags dedicatedcode/reitti:tagname
48-
49-
31+ - name : Build & Publish Latest Docker Image
32+ run : mvn spring-boot:build-image -Pdocker -DskipTests -Ddocker.tag=latest
5033 - uses : " marvinpinto/action-automatic-releases@latest"
5134 with :
5235 repo_token : " ${{ secrets.GITHUB_TOKEN }}"
Original file line number Diff line number Diff line change 1414 <name >reitti</name >
1515 <description >Reitti application</description >
1616 <properties >
17+ <docker .tag>latest</docker .tag>
1718 <java .version>24</java .version>
1819 <argLine />
1920 <testcontainers .version>1.19.5</testcontainers .version>
158159 <artifactId >spring-boot-maven-plugin</artifactId >
159160 <configuration >
160161 <image >
161- <name >dedicatedcode/reitti:latest </name >
162+ <name >dedicatedcode/reitti:${docker.tag} </name >
162163 <env >
163164 <BP_JVM_VERSION >24</BP_JVM_VERSION >
164165 </env >
165166 </image >
166167 <layers >
167168 <enabled >true</enabled >
168169 </layers >
170+ <publish >true</publish >
169171 </configuration >
170172 <executions >
171173 <execution >
You can’t perform that action at this time.
0 commit comments