-
-
Notifications
You must be signed in to change notification settings - Fork 46
45 lines (43 loc) · 1.67 KB
/
docker-push.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-push
on:
push:
branches: [ "main" ]
jobs:
docker-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set VERSION variable
run: echo "VERSION=$(cat ./version)" >> $GITHUB_ENV
- name: Docker compose build facetorch
run: docker compose build facetorch
- name: Tag image with version
run: docker tag tomasgajarsky/facetorch:latest tomasgajarsky/facetorch:${{ env.VERSION }}
- name: Login to Docker hub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD docker.io
- name: Push images
run: |
docker push tomasgajarsky/facetorch:latest
docker push tomasgajarsky/facetorch:${{ env.VERSION }}
docker-push-gpu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set VERSION variable
run: echo "VERSION=$(cat ./version)" >> $GITHUB_ENV
- name: Docker compose build facetorch-gpu
run: docker compose build facetorch-gpu-no-device
- name: Tag image with version
run: docker tag tomasgajarsky/facetorch-gpu:latest tomasgajarsky/facetorch-gpu:${{ env.VERSION }}
- name: Login to Docker hub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD docker.io
- name: Push images
run: |
docker push tomasgajarsky/facetorch-gpu:latest
docker push tomasgajarsky/facetorch-gpu:${{ env.VERSION }}