feat: add kapinger traffic gen tool #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |