Skip to content

Commit 7f992f0

Browse files
Update workflow configuration #1
1 parent 5404e0b commit 7f992f0

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,33 @@ jobs:
1212
with:
1313
persist-credentials: false
1414

15+
- name: Parse tag
16+
id: vars
17+
run: echo ::set-output name=tag::${GITHUB_REF_NAME#v}
18+
1519
- name: Install and Build
1620
run: |
1721
npm install
18-
npm run-script test
1922
npm run-script build
2023
npm run-script test
2124
22-
- name: Build and publish Docker image
25+
- name: Build and publish Docker image - Main
2326
if: github.ref == 'refs/heads/main'
2427
uses: elgohr/Publish-Docker-Github-Action@33a481be3e179353cb7793a92b57cf9a6c985860 # v4
2528
with:
2629
name: gridsuite/gridadmin-app
2730
username: gridsuiteci
2831
password: ${{ secrets.DOCKERHUB_TOKEN }}
2932

33+
- name: Build and publish Docker image - Tag
34+
if: startsWith(github.ref, 'refs/tags/')
35+
uses: elgohr/Publish-Docker-Github-Action@33a481be3e179353cb7793a92b57cf9a6c985860 # v4
36+
with:
37+
name: gridsuite/gridstudy-app
38+
username: gridsuiteci
39+
password: ${{ secrets.DOCKERHUB_TOKEN }}
40+
tags: ${{ steps.vars.outputs.tag }}
41+
3042
- name: Broadcast update event
3143
if: github.ref == 'refs/heads/main'
3244
uses: gridsuite/broadcast-event@main

0 commit comments

Comments
 (0)