Merge pull request #40 from jembi/hotfix #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |