Skip to content

v1.2.0

v1.2.0 #23

Workflow file for this run

#
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Build Latest Docker
on:
release:
types: [published]
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git pull origin main
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Get version
id: version
run: echo ::set-output name=version::$(echo $(sed -nE "s/\"version\":(.*),/\1/p" package.json))
- name: Set tag
id: vars
run: echo ::set-output name=imageName::$(echo breedinginsight/biweb:${{steps.version.outputs.version}})
- name: Build Docker and push image
run: |
docker build . --file Dockerfile --tag ${{steps.vars.outputs.imageName}}
docker push ${{steps.vars.outputs.imageName}}
docker tag ${{steps.vars.outputs.imageName}} breedinginsight/biweb:latest
docker push breedinginsight/biweb:latest