Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): Add a CI workflow to build and push multiubuntu image whenever a change detected #1878

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
43 changes: 43 additions & 0 deletions .github/workflows/ci-build-and-push-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ci-build-and-push-ubuntu

on:
push:
branches:
- main

jobs:
build:
if: github.repository == 'kubearmor/kubearmor'
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true

- name: Set up QEMU for multi-architecture builds
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64/v8

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_AUTHTOK }}

- name: Build and push multi-architecture image
uses: docker/build-push-action@v6
with:
context: examples/multiubuntu/build
file: examples/multiubuntu/build/Dockerfile
push: true
tags: kubearmor/ubuntu-w-utils:latest
platforms: linux/amd64,linux/arm64/v8

- name: Logout from Docker Hub
run: docker logout
1 change: 1 addition & 0 deletions .github/workflows/ci-test-ginkgo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- ".github/workflows/ci-test-ginkgo.yml"
- "pkg/KubeArmorOperator/**"
- "deployments/helm/**"
- "examples/multiubuntu/build/**"
pull_request:
branches: [main]
paths:
Expand Down