Skip to content

Merge pull request #40 from jembi/hotfix #29

Merge pull request #40 from jembi/hotfix

Merge pull request #40 from jembi/hotfix #29

name: Build and Push jembi/mpi-mediator image
on:
push:
tags:
- "*.*.*"
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-20.04
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v3
- run: npm run build
- name: Build and push tag
if: ${{ github.ref_name != 'main' }}
run: 'docker build -t jembi/mpi-mediator:${{ github.ref_name }} .;
docker push jembi/mpi-mediator:${{ github.ref_name }}'
- name: Build and push latest
if: ${{ github.ref_name == 'main' }}
run: 'docker build -t jembi/mpi-mediator:latest .;
docker push jembi/mpi-mediator:latest'