Skip to content

feat: add kapinger traffic gen tool #2

feat: add kapinger traffic gen tool

feat: add kapinger traffic gen tool #2

Workflow file for this run

name: Build and Push Kapinger Image
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Windows image
uses: docker/build-push-action@v2
with:
context: hack/tools/kapinger
file: hack/tools/kapinger/Dockerfile.windows
platforms: windows/amd64
push: true
provenance: false
tags: ghcr.io/${{ github.repository }}/kapinger:${{ github.sha }}-windows
- name: Build and push Linux image
uses: docker/build-push-action@v2
with:
context: hack/tools/kapinger
file: hack/tools/kapinger/Dockerfile
platforms: linux/amd64
push: true
provenance: false
tags: ghcr.io/${{ github.repository }}/kapinger:${{ github.sha }}-linux
- name: Create and push manifest
id: docker_manifest
run: |
docker manifest create ghcr.io/${{ github.repository }}/kapinger:latest ghcr.io/${{ github.repository }}/kapinger:${{ github.sha }}-windows ghcr.io/${{ github.repository }}/kapinger:${{ github.sha }}-linux
docker manifest push ghcr.io/${{ github.repository }}/kapinger:latest