This repository has been archived by the owner on Jan 21, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 30
165 lines (151 loc) · 5.12 KB
/
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
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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Publish Docker Image
on:
push:
branches:
- '**'
jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
-
name: Check out the repo
uses: actions/checkout@v2
-
name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: |
blacktop/zeek
ghcr.io/${{ github.repository }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Docker Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push Docker image (v3)
# id: docker_build_3
# uses: docker/build-push-action@v2
# with:
# context: ./3.2
# push: ${{ github.event_name != 'pull_request' }}
# tags: |
# blacktop/zeek:3
# blacktop/zeek:3.2
# blacktop/zeek:3.2.4
# labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (v4.0)
id: docker_build_4
uses: docker/build-push-action@v2
with:
context: ./4.0
push: ${{ github.event_name != 'pull_request' }}
tags: |
blacktop/zeek:4.0
blacktop/zeek:4.0.4
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (v4.1)
id: docker_build_4_1
uses: docker/build-push-action@v2
with:
context: ./4.1
push: ${{ github.event_name != 'pull_request' }}
tags: |
blacktop/zeek:4
blacktop/zeek:4.1
blacktop/zeek:4.1.1
ghcr.io/blacktop/zeek:4
ghcr.io/blacktop/zeek:4.1
ghcr.io/blacktop/zeek:4.1.1
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (v5.1)
id: docker_build_5_1
uses: docker/build-push-action@v2
with:
context: ./5.1
push: ${{ github.event_name != 'pull_request' }}
tags: |
blacktop/zeek:latest
blacktop/zeek:5
blacktop/zeek:5.1
blacktop/zeek:5.1.0
ghcr.io/blacktop/zeek:latest
ghcr.io/blacktop/zeek:5
ghcr.io/blacktop/zeek:5.1
ghcr.io/blacktop/zeek:5.1.0
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (elastic)
id: docker_build_elastic
uses: docker/build-push-action@v2
with:
context: ./elastic
push: ${{ github.event_name != 'pull_request' }}
tags: |
blacktop/zeek:elastic
blacktop/zeek:4-elastic
blacktop/zeek:4.1-elastic
blacktop/zeek:4.1.1-elastic
ghcr.io/blacktop/zeek:elastic
ghcr.io/blacktop/zeek:4-elastic
ghcr.io/blacktop/zeek:4.1-elastic
ghcr.io/blacktop/zeek:4.1.1-elastic
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (kafka)
id: docker_build_kafka
uses: docker/build-push-action@v2
with:
context: ./kafka
push: ${{ github.event_name != 'pull_request' }}
tags: |
blacktop/zeek:kafka
blacktop/zeek:4-kafka
blacktop/zeek:4.1-kafka
blacktop/zeek:4.1.1-kafka
ghcr.io/blacktop/zeek:kafka
ghcr.io/blacktop/zeek:4-kafka
ghcr.io/blacktop/zeek:4.1-kafka
ghcr.io/blacktop/zeek:4.1.1-kafka
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (zeekctl)
id: docker_build_zeekctl
uses: docker/build-push-action@v2
with:
context: ./zeekctl
push: ${{ github.event_name != 'pull_request' }}
tags: |
blacktop/zeek:ctl
blacktop/zeek:4-ctl
blacktop/zeek:4.1-ctl
blacktop/zeek:4.1.1-ctl
ghcr.io/blacktop/zeek:ctl
ghcr.io/blacktop/zeek:4-ctl
ghcr.io/blacktop/zeek:4.1-ctl
ghcr.io/blacktop/zeek:4.1.1-ctl
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}