-
Notifications
You must be signed in to change notification settings - Fork 42
46 lines (42 loc) · 1.2 KB
/
docker.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
name: Uni-Dock/Tools Build Image Workflow
on:
workflow_dispatch:
push:
branches:
- main
tags:
- "*"
jobs:
build_and_push_docker_image:
runs-on: t4
if: github.repository_owner == 'dptech-corp'
strategy:
matrix:
target: [unidock, unidock_tools]
max-parallel: 1 # Ensures unidock_tools is built after unidock
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: dptechnology/${{ matrix.target }}
tags: |
type=sha
type=semver,pattern={{version}}
type=raw,value=latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: dptechnology
password: ${{ secrets.DOCKERHUB_PAT }}
- name: build and push container
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: Dockerfile
context: "{{defaultContext}}:${{ matrix.target }}"
push: true