Skip to content

Build Base DPDK

Build Base DPDK #7

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-24.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@v4
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-24.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@v4
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