-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (55 loc) · 1.75 KB
/
build-push-dev.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
46
47
48
49
50
51
52
53
54
55
56
57
58
name: build-push-dev
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Write Tag to ENV variable
run: echo "BRANCH_NAME=${GITHUB_REF_NAME}" >> $GITHUB_ENV
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME_COMMUNITY }}
password: ${{ secrets.DOCKER_TOKEN_COMMUNITY }}
-
name: Login to Docker Supervisely Enterprise
uses: docker/login-action@v1
with:
registry: ${{ secrets.DOCKER_ENTERPRISE_REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME_ENTERPRISE }}
password: ${{ secrets.DOCKER_PASSWORD_ENTERPRISE }}
-
name: Get Docker Labels from python script
run: python .github/workflows/docker_labels.py
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
version: v0.9.1
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
provenance: false
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: |
supervisely/agent:dev
build-args: |
LABEL_VERSION=agent:6.999.0
LABEL_INFO=${{ env.LABEL_INFO }}
LABEL_MODES=${{ env.LABEL_MODES }}
LABEL_README=${{ env.LABEL_README }}
LABEL_BUILT_AT=${{ env.LABEL_BUILT_AT }}
cache-from: type=registry,ref=supervisely/agent:cache
cache-to: type=registry,ref=supervisely/agent:cache,mode=max
# cache-from: type=gha
# cache-to: type=gha,mode=max