Skip to content

Commit

Permalink
Update workflow configuration
Browse files Browse the repository at this point in the history
based on gridstudy and gridexplore
  • Loading branch information
Tristan-WorkGH committed Jan 16, 2024
1 parent 558fd23 commit 09db5fe
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,33 @@ jobs:
with:
persist-credentials: false

- name: Parse tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF_NAME#v}

- name: Install and Build
run: |
npm install
npm run-script test
npm run-script build
npm run-script test
- name: Build and publish Docker image
- name: Build and publish Docker image - Main
if: github.ref == 'refs/heads/main'
uses: elgohr/Publish-Docker-Github-Action@33a481be3e179353cb7793a92b57cf9a6c985860 # v4
with:
name: gridsuite/gridXXX-app
username: gridsuiteci
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and publish Docker image - Tag
if: startsWith(github.ref, 'refs/tags/')
uses: elgohr/Publish-Docker-Github-Action@33a481be3e179353cb7793a92b57cf9a6c985860 # v4
with:
name: gridsuite/gridstudy-app
username: gridsuiteci
password: ${{ secrets.DOCKERHUB_TOKEN }}
tags: ${{ steps.vars.outputs.tag }}

- name: Broadcast update event
if: github.ref == 'refs/heads/main'
uses: gridsuite/broadcast-event@main
Expand Down

0 comments on commit 09db5fe

Please sign in to comment.