-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.44 KB
/
docker-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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/pheno-ranker-app:${{ steps.get_version.outputs.VERSION }} .
docker tag manuelrueda/pheno-ranker-app:${{ steps.get_version.outputs.VERSION }} manuelrueda/pheno-ranker-app: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/pheno-ranker-app:${{ steps.get_version.outputs.VERSION }}
docker image push manuelrueda/pheno-ranker-app:latest