Docker build #69
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@v2 | |
- name: Get version | |
id: get_version | |
run: echo "::set-output name=VERSION::$(cat VERSION)" | |
- name: Set up Git user | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
# - name: Create tag | |
# run: git tag -a ${{ steps.get_version.outputs.VERSION }} -m 'Tagging version ${{ steps.get_version.outputs.VERSION }}' ${{ github.sha }} | |
# - name: Push tag to repository | |
# run: git push origin ${{ steps.get_version.outputs.VERSION }} | |
- name: Build Docker image | |
run: | | |
docker build -t manuelrueda/convert-pheno:${{ steps.get_version.outputs.VERSION }} . | |
docker tag manuelrueda/convert-pheno:${{ steps.get_version.outputs.VERSION }} manuelrueda/convert-pheno:latest | |
- name: Login to Docker Hub | |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Push to Docker Hub | |
run: | | |
docker image push manuelrueda/convert-pheno:${{ steps.get_version.outputs.VERSION }} | |
docker image push manuelrueda/convert-pheno:latest |