-
Notifications
You must be signed in to change notification settings - Fork 9
209 lines (202 loc) · 8.67 KB
/
pull-request.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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
name: Build/push dev Docker images
on:
pull_request:
paths:
- sddi-base/**
- sddi/**
- sddi-social/**
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
-
name: Parse short sha
uses: benjlevesque/[email protected]
id: short-sha
-
name: Checkout repository
uses: actions/checkout@v3
-
name: Log in to the Github Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# SDDI-BASE
-
name: Extract metadata (tags, labels) for docker image
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev
tags: |
type=ref,event=pr,prefix=sddi-base-pr-,suffix=-{{sha}}
labels: |
maintainer=Chair of Geoinformatics, Technical University of Munich (TUM)
org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM)
org.opencontainers.image.title=ckan-sddi-base-docker-dev
-
name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}
uses: docker/build-push-action@v4
with:
push: true
context: sddi-base
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
name: Print image name
run: |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}"
-
name: Extract metadata (tags, labels) for docker image
id: meta-debug
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev
tags: |
type=ref,event=pr,prefix=sddi-base-pr-,suffix=-{{sha}}-debug
labels: |
maintainer=Chair of Geoinformatics, Technical University of Munich (TUM)
org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM)
org.opencontainers.image.title=ckan-sddi-base-docker-dev-debug
-
name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}-debug
uses: docker/build-push-action@v4
with:
push: true
context: sddi-base
file: sddi-base/Dockerfile.debug
tags: ${{ steps.meta-debug.outputs.tags }}
labels: ${{ steps.meta-debug.outputs.labels }}
build-args: |
BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev
BASEIMAGE_VERSION=sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}
-
name: Print image name
run: |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}-debug"
# SDDI
-
name: Extract metadata (tags, labels) for docker image
id: meta-sddi
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev
tags: |
type=ref,event=pr,prefix=sddi-pr-,suffix=-{{sha}}
labels: |
maintainer=Chair of Geoinformatics, Technical University of Munich (TUM)
org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM)
org.opencontainers.image.title=ckan-sddi-docker-dev
-
name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}
uses: docker/build-push-action@v4
with:
push: true
context: sddi
tags: ${{ steps.meta-sddi.outputs.tags }}
labels: ${{ steps.meta-sddi.outputs.labels }}
build-args: |
BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev
BASEIMAGE_VERSION=sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}
-
name: Print image name
run: |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}"
-
name: Extract metadata (tags, labels) for docker image
id: meta-sddi-debug
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev
tags: |
type=ref,event=pr,prefix=sddi-pr-,suffix=-{{sha}}-debug
labels: |
maintainer=Chair of Geoinformatics, Technical University of Munich (TUM)
org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM)
org.opencontainers.image.title=ckan-sddi-docker-dev-debug
-
name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}-debug
uses: docker/build-push-action@v4
with:
push: true
context: sddi
file: sddi/Dockerfile.debug
tags: ${{ steps.meta-sddi-debug.outputs.tags }}
labels: ${{ steps.meta-sddi-debug.outputs.labels }}
build-args: |
BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev
BASEIMAGE_VERSION=sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}
-
name: Print image name
run: |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}-debug"
# SDDI-SOCIAL
-
name: Extract metadata (tags, labels) for docker image
id: meta-sddi-social
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev
tags: |
type=ref,event=pr,prefix=sddi-social-pr-,suffix=-{{sha}}
labels: |
maintainer=Chair of Geoinformatics, Technical University of Munich (TUM)
org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM)
org.opencontainers.image.title=ckan-sddi-social-docker-dev
-
name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}
uses: docker/build-push-action@v4
with:
push: true
context: sddi-social
tags: ${{ steps.meta-sddi-social.outputs.tags }}
labels: ${{ steps.meta-sddi-social.outputs.labels }}
build-args: |
BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev
BASEIMAGE_VERSION=sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}
-
name: Print image name
run: |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}"
-
name: Extract metadata (tags, labels) for docker image
id: meta-sddi-social-debug
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev
tags: |
type=ref,event=pr,prefix=sddi-social-pr-,suffix=-{{sha}}-debug
labels: |
maintainer=Chair of Geoinformatics, Technical University of Munich (TUM)
org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM)
org.opencontainers.image.title=ckan-sddi-social-docker-dev-debug
-
name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}-debug
uses: docker/build-push-action@v4
with:
push: true
context: sddi-social
file: sddi-social/Dockerfile.debug
tags: ${{ steps.meta-sddi-social-debug.outputs.tags }}
labels: ${{ steps.meta-sddi-social-debug.outputs.labels }}
build-args: |
BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev
BASEIMAGE_VERSION=sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}
-
name: Print image name
run: |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}-debug"