forked from ome/docker-example-omero-grid
-
Notifications
You must be signed in to change notification settings - Fork 3
120 lines (118 loc) · 3.84 KB
/
docker-image.yml
File metadata and controls
120 lines (118 loc) · 3.84 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Docker Image CI
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Load .env file (BIOMERO_VERSION)
uses: xom9ikk/dotenv@v2.3.0
-
# Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Docker meta WEB
id: meta-web
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKERHUB_USERNAME }}/omeroweb
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Build and push WEB
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}"
push: true
file: ./web/Dockerfile
tags: ${{ steps.meta-web.outputs.tags }}
labels: ${{ steps.meta-web.outputs.labels }}
build-args: |
OMERO_BIOMERO_VERSION=${{ env.OMERO_BIOMERO_VERSION }}
OMERO_FORMS_VERSION=${{ env.OMERO_FORMS_VERSION }}
-
name: Docker meta SERVER
id: meta-server
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKERHUB_USERNAME }}/omeroserver
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Build and push SERVER
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}"
push: true
file: ./server/Dockerfile
tags: ${{ steps.meta-server.outputs.tags }}
labels: ${{ steps.meta-server.outputs.labels }}
build-args: |
BIOMERO_VERSION=${{ env.BIOMERO_VERSION }}
OMERO_ZARR_PIXEL_BUFFER_VERSION=${{ env.OMERO_ZARR_PIXEL_BUFFER_VERSION }}
-
name: Docker meta BIOMERO
id: meta-biomero
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKERHUB_USERNAME }}/biomero
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Build and push BIOMERO PROCESSOR
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}"
push: true
file: ./biomeroworker/Dockerfile
tags: ${{ steps.meta-biomero.outputs.tags }}
labels: ${{ steps.meta-biomero.outputs.labels }}
build-args: |
BIOMERO_VERSION=${{ env.BIOMERO_VERSION }}
BIOMERO_IMPORTER_VERSION=${{ env.BIOMERO_IMPORTER_VERSION }}
-
name: Docker meta WORKER
id: meta-worker
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKERHUB_USERNAME }}/omeroworker
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Build and push WORKER
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:worker"
push: true
tags: ${{ steps.meta-worker.outputs.tags }}
labels: ${{ steps.meta-worker.outputs.labels }}