-
Notifications
You must be signed in to change notification settings - Fork 147
62 lines (53 loc) · 1.63 KB
/
build-onvif-video-broker-container.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
name: Build ONVIF Broker (.NET)
on:
push:
branches: [ main ]
paths:
- .github/workflows/build-onvif-video-broker-container.yml
- build/containers/Dockerfile.onvif-video-broker
- samples/brokers/onvif-video-broker/**
- version.txt
- build/samples.mk
- Makefile
pull_request:
branches: [ main ]
paths:
- .github/workflows/build-onvif-video-broker-container.yml
- build/containers/Dockerfile.onvif-video-broker
- samples/brokers/onvif-video-broker/**
- version.txt
- build/samples.mk
- Makefile
release:
types:
- published
env:
AKRI_COMPONENT: onvif-video-broker
MAKEFILE_COMPONENT: onvif
jobs:
build-broker:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout the head commit of the branch
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Get version.txt
id: version-string
run: |
echo "version=$(cat version.txt)" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: github.event_name == 'push' || github.event_name == 'release'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.crUsername }}
password: ${{ secrets.crPassword }}
- name: Build and push
run: |
make onvif-video-broker PREFIX=ghcr.io/project-akri/akri $(${{ github.event_name != 'pull_request' }} && echo "PUSH=1")