Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME_UBUNTU: ${{ github.repository }}
IMAGE_NAME_FEDORA: ${{ github.repository }}-fedora
IMAGE_NAME_UBUNTU: ghcr.io/mellanox/ovn-kubernetes-dpf
IMAGE_NAME_FEDORA: ghcr.io/mellanox/ovn-kubernetes-dpf-fedora

jobs:
build-ubuntu:
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_UBUNTU }}
images: ${{ env.IMAGE_NAME_UBUNTU }}

- name: Build and push Ubuntu image
uses: docker/build-push-action@v5
Expand All @@ -67,13 +67,14 @@ jobs:
file: ./Dockerfile.ovn-kubernetes.ubuntu
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_UBUNTU }}:${{ steps.tag.outputs.tag }}
tags: ${{ env.IMAGE_NAME_UBUNTU }}:${{ steps.tag.outputs.tag }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
OVN_KUBERNETES_DIR=ovn-kubernetes
BUILDER_IMAGE=quay.io/projectquay/golang:1.24
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false

build-fedora:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -116,7 +117,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_FEDORA }}
images: ${{ env.IMAGE_NAME_FEDORA }}

- name: Build and push Fedora image
uses: docker/build-push-action@v5
Expand All @@ -125,11 +126,12 @@ jobs:
file: ./Dockerfile.ovn-kubernetes.fedora
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_FEDORA }}:${{ steps.tag.outputs.tag }}
tags: ${{ env.IMAGE_NAME_FEDORA }}:${{ steps.tag.outputs.tag }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
OVN_KUBERNETES_DIR=ovn-kubernetes
BUILDER_IMAGE=quay.io/projectquay/golang:1.24
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false

18 changes: 14 additions & 4 deletions .github/workflows/publish-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main
tags:
- 'v*'
pull_request:
branches:
- main
workflow_dispatch:

env:
Expand Down Expand Up @@ -35,10 +38,6 @@ jobs:
with:
version: 'latest'

- name: Log in to Container Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ${{ env.REGISTRY }} --username ${{ github.actor }} --password-stdin

- name: Determine tag
id: tag
run: |
Expand All @@ -49,7 +48,18 @@ jobs:
fi
echo "tag=${TAG}" >> $GITHUB_OUTPUT

- name: Log in to Container Registry
if: github.event_name != 'pull_request'
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ${{ env.REGISTRY }} --username ${{ github.actor }} --password-stdin

- name: Build Helm chart
if: github.event_name == 'pull_request'
run: |
make helm-build TAG=${{ steps.tag.outputs.tag }} REGISTRY=ghcr.io/mellanox

- name: Build and publish Helm chart
if: github.event_name != 'pull_request'
run: |
make helm-publish TAG=${{ steps.tag.outputs.tag }} REGISTRY=ghcr.io/mellanox

Loading