64
64
- name : Install dependencies ⏬
65
65
run : npm ci
66
66
67
+ - name : Semantic Release 🚀
68
+ uses : cycjimmy/semantic-release-action@v4
69
+ id : semantic
70
+ env :
71
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
73
+ with :
74
+ semantic_version : 23
75
+
67
76
- name : Build artifacts 🏗️
68
77
run : npm run build
69
78
@@ -74,28 +83,57 @@ jobs:
74
83
username : ${{ secrets.NEXUS_USERNAME }}
75
84
password : ${{ secrets.NEXUS_PASSWORD }}
76
85
77
- - name : Build docker gis-client image (main ) 🏗️
86
+ - name : Build docker gis-client image (latest ) 🏗️
78
87
uses : docker/build-push-action@v5
79
88
with :
80
89
context : .
81
90
file : Dockerfile.gis.client
82
91
tags : |
83
- ${{ env.DOCKER_REGISTRY }}/shogun-gis-client-docs:main
92
+ ${{ env.DOCKER_REGISTRY }}/shogun-gis-client-docs:latest
84
93
load : true
85
94
86
- - name : Push docker gis-client image to Nexus (main) 📠
95
+ - name : Build docker gis-client image (version)
96
+ if : steps.semantic.outputs.new_release_published == 'true'
97
+ uses : docker/build-push-action@v5
98
+ with :
99
+ context : .
100
+ tags : |
101
+ ${{ env.DOCKER_REGISTRY }}/shogun-gis-client-docs:${{ steps.semantic.outputs.new_release_version }}
102
+ load : true
103
+
104
+ - name : Push docker gis-client image to Nexus (latest) 📠
87
105
run : |
88
- docker push ${{ env.DOCKER_REGISTRY }}/shogun-gis-client-docs:main
106
+ docker push ${{ env.DOCKER_REGISTRY }}/shogun-gis-client-docs:latest
89
107
90
- - name : Build docker admin-client image (main) 🏗️
108
+ - name : Push docker gis-client image to Nexus (version)
109
+ if : steps.semantic.outputs.new_release_published == 'true'
110
+ run : |
111
+ docker push ${{ env.DOCKER_REGISTRY }}/shogun-gis-client-docs:${{ steps.semantic.outputs.new_release_version }}
112
+
113
+ - name : Build docker admin-client image (latest) 🏗️
91
114
uses : docker/build-push-action@v5
92
115
with :
93
116
context : .
94
117
file : Dockerfile.admin.client
95
118
tags : |
96
- ${{ env.DOCKER_REGISTRY }}/shogun-admin-client-docs:main
119
+ ${{ env.DOCKER_REGISTRY }}/shogun-admin-client-docs:latest
97
120
load : true
98
121
99
- - name : Push docker admin-client image to Nexus (main) 📠
122
+ - name : Build docker admin-client image (version)
123
+ if : steps.semantic.outputs.new_release_published == 'true'
124
+ uses : docker/build-push-action@v5
125
+ with :
126
+ context : .
127
+ tags : |
128
+ ${{ env.DOCKER_REGISTRY }}/shogun-admin-client-docs:${{ steps.semantic.outputs.new_release_version }}
129
+ load : true
130
+
131
+ - name : Push docker admin-client image to Nexus (latest) 📠
100
132
run : |
101
- docker push ${{ env.DOCKER_REGISTRY }}/shogun-admin-client-docs:main
133
+ docker push ${{ env.DOCKER_REGISTRY }}/shogun-admin-client-docs:latest
134
+
135
+ - name : Push docker admin-client image to Nexus (version)
136
+ if : steps.semantic.outputs.new_release_published == 'true'
137
+ run : |
138
+ docker push ${{ env.DOCKER_REGISTRY }}/shogun-admin-client-docs:${{ steps.semantic.outputs.new_release_version }}
139
+
0 commit comments