Docker build #38
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: Docker build | |
on: | |
workflow_dispatch: | |
#push: | |
# branches: [ "main" ] | |
#pull_request: | |
# branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build the image | |
run: bash ${GITHUB_WORKSPACE}/build/build_phenoRankeR_w_docker.sh | |
- name: push the image | |
run: | | |
version=$(grep -oP 'Version: \K.*' ${GITHUB_WORKSPACE}/phenoRankeR/DESCRIPTION) | |
docker tag phenorankerui:${version} ${{ secrets.DOCKERHUB_USERNAME }}/pheno-ranker-ui:${version} | |
docker push ${{ secrets.DOCKERHUB_USERNAME }}/pheno-ranker-ui:${version} |