Skip to content

Commit 09f3ffc

Browse files
gaubejjonenst
andauthored
Build on tag (#65)
Co-authored-by: Jon Harper <[email protected]>
1 parent c249b6e commit 09f3ffc

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/maven.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- 'main'
7+
tags:
8+
- 'v[0-9]*'
79
pull_request:
810

911
jobs:
@@ -33,7 +35,7 @@ jobs:
3335
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3436
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3537

36-
- name: Build Docker image
38+
- name: Build Docker image - Main
3739
if: github.ref == 'refs/heads/main'
3840
run: >
3941
mvn --batch-mode deploy -DskipTests -Dmaven.install.skip -Dmaven.deploy.skip -Dpowsybl.docker.deploy
@@ -42,6 +44,15 @@ jobs:
4244
-Djib.to.auth.username=gridsuiteci
4345
-Djib.to.auth.password=${{ secrets.DOCKERHUB_TOKEN }}
4446
47+
- name: Build Docker image - Tag
48+
if: startsWith(github.ref, 'refs/tags/')
49+
run: >
50+
mvn --batch-mode deploy -DskipTests -Dmaven.install.skip -Dmaven.deploy.skip -Dpowsybl.docker.deploy
51+
-Djib.httpTimeout=60000
52+
-Djib.to.image=docker.io/gridsuite/gateway:${GITHUB_REF_NAME#v}
53+
-Djib.to.auth.username=gridsuiteci
54+
-Djib.to.auth.password=${{ secrets.DOCKERHUB_TOKEN }}
55+
4556
- name: Broadcast update event
4657
if: github.ref == 'refs/heads/main'
4758
uses: gridsuite/broadcast-event@main

0 commit comments

Comments
 (0)