forked from vmware/go-ipfix
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.55 KB
/
build.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
name: Build and push the latest image if needed
on:
pull_request:
branches:
- main
- release-*
push:
branches:
- main
- release-*
jobs:
build-ipfix-collector:
if: ${{ github.event_name == 'push' }}
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Build ipfix-collector Docker image
run: make docker-collector
- name: Push ipfix-collector Docker image to Antrea Docker registry
if: ${{ github.repository == 'vmware/go-ipfix' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push antrea/ipfix-collector:latest
build-kafka-consumer:
if: ${{ github.event_name == 'push' }}
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Build kafka-consumer Docker image
run: make docker-consumer
- name: Push kafka-consumer Docker image to Antrea Docker registry
if: ${{ github.repository == 'vmware/go-ipfix' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push antrea/kafka-consumer:latest