-
Notifications
You must be signed in to change notification settings - Fork 450
91 lines (83 loc) · 2.55 KB
/
build-kube-ovn-base-dpdk.yaml
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
name: Build Base DPDK
on:
workflow_dispatch:
inputs:
branch:
description: "Select branch"
required: true
type: choice
options:
- master
- release-1.12
- release-1.12-mc
schedule:
- cron: "20 19 * * *"
jobs:
build-amd64:
strategy:
fail-fast: false
matrix:
branch:
- master
- release-1.12
- release-1.12-mc
name: Build AMD64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
with:
ref: ${{ matrix.branch }}
- uses: docker/setup-buildx-action@v3
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
- name: Build
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
run: |
make base-amd64-dpdk
make base-tar-amd64-dpdk
- name: Upload image to artifact
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
uses: actions/upload-artifact@v3
with:
name: image-amd64-dpdk-${{ matrix.branch }}
path: image-amd64-dpdk.tar
retention-days: 7
push:
strategy:
fail-fast: false
matrix:
branch:
- master
- release-1.12
- release-1.12-mc
needs:
- build-amd64
name: push
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
with:
ref: ${{ matrix.branch }}
- name: Download image
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
uses: actions/download-artifact@v3
with:
name: image-amd64-dpdk-${{ matrix.branch }}
- name: Load Image
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
run: |
docker load --input image-amd64-dpdk.tar
- name: Push
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
COMMIT: ${{ github.sha }}
run: |
cat VERSION
TAG=$(cat VERSION)
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker images
docker tag kubeovn/kube-ovn-base:$TAG-amd64-dpdk kubeovn/kube-ovn-base:$TAG-dpdk
docker push kubeovn/kube-ovn-base:$TAG-dpdk