-
-
Notifications
You must be signed in to change notification settings - Fork 11
96 lines (87 loc) · 3.05 KB
/
build-docker-image.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
name: build-docker-image
on:
release:
types: [created, edited]
env:
REGISTRY: ghcr.io
jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- branding: tf2pickup.cz
apiUrl: api.tf2pickup.cz
- branding: tf2pickup.de
apiUrl: api.tf2pickup.de
- branding: tf2pickup.fi
apiUrl: api.tf2pickup.fi
- branding: tf2pickup.pt
apiUrl: api.tf2pickup.pt
- branding: tf2pickup.se
apiUrl: api.tf2pickup.se
- branding: tf2pickup.it
apiUrl: api.tf2pickup.it
- branding: bball.tf2pickup.eu
apiUrl: api.bball.tf2pickup.eu
- branding: tf2pickup.ru
apiUrl: api.tf2pickup.ru
- branding: sib.tf2pickup.ru
apiUrl: api.sib.tf2pickup.ru
- branding: tf2pickup.co.il
apiUrl: api.tf2pickup.co.il
- branding: br.tf2pickup.org
apiUrl: api.br.tf2pickup.org
- branding: hl.br.tf2pickup.org
apiUrl: api.hl.br.tf2pickup.org
- branding: ultiduo.tf2pickup.eu
apiUrl: api.ultiduo.tf2pickup.eu
- branding: hl.tf2pickup.eu
apiUrl: api.hl.tf2pickup.eu
- branding: 6v6.poland.tf
apiUrl: api.6v6.poland.tf
- branding: hl.poland.tf
apiUrl: api.hl.poland.tf
- branding: bball.poland.tf
apiUrl: api.bball.poland.tf
- branding: ultiduo.poland.tf
apiUrl: api.ultiduo.poland.tf
- branding: tf2pickup.eu
apiUrl: api.tf2pickup.eu
- branding: hl.tf2pickup.us
apiUrl: api.hl.tf2pickup.us
- branding: arena.tf2pickup.eu
apiUrl: api.arena.tf2pickup.eu
- branding: au.tf2pickup.org
apiUrl: api.au.tf2pickup.org
- branding: tf2pickup.us
apiUrl: api.tf2pickup.us
steps:
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/tf2pickup-org/${{ matrix.branding }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern=stable,enable=${{ !contains(github.event.push.ref, 'alpha') && !contains(github.event.push.ref, 'beta') && !contains(github.event.push.ref, 'rc') }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
push: true
build-args: |
branding=${{ matrix.branding }}
apiUrl=${{ matrix.apiUrl }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
- name: Print image digest
run: echo ${{ steps.docker_build.outputs.digest }}