Merge pull request #82 from databio/dev #43
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 master image to Dockerhub | |
on: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
inputs: null | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout bedhost | |
uses: actions/checkout@v2 | |
- name: Checkout bedhost-ui@master | |
uses: actions/checkout@v2 | |
with: | |
repository: databio/bedhost-ui | |
ref: master | |
path: bedhost-ui | |
- name: Setup Node.js 12.18.4 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12.18.4 | |
- name: Build production package | |
run: | | |
cd bedhost-ui | |
npm install | |
npm run build | |
cd .. | |
- name: Copy to bedhost package | |
run: | | |
mkdir -p bedhost/static/bedhost-ui | |
rm -rf bedhost/static/bedhost-ui/* | |
cp -r bedhost-ui/build/* bedhost/static/bedhost-ui/ | |
- name: Push to DockerHub | |
uses: docker/build-push-action@v1 | |
with: | |
dockerfile: ./Dockerfile | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
repository: databio/bedhost | |
tag_with_ref: true |