Skip to content

Merge pull request #183 from epam/develop #8

Merge pull request #183 from epam/develop

Merge pull request #183 from epam/develop #8

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Use GitVersion
uses: gittools/actions/gitversion/[email protected]
id: gitversion
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- run: node --version
- run: npm install
- run: npm run build
- run: npm test
env:
CI: true
- run: mv ./build ./docker/build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./docker/
file: ./docker/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: |
lifescience/mri-viewer:latest
lifescience/mri-viewer:${{ steps.gitversion.outputs.MajorMinorPatch }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}