ci: added multi-arch bin #11
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: create-bin | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
architecture: ["linux/amd64", "linux/arm64"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: docker/setup-buildx-action@v3 | |
- name: Build Docker image | |
run: | | |
docker buildx build --platform ${{ matrix.architecture }} -o type=local,dest=./docker . | |
- name: Reformat architecture name | |
id: reformat_architecture | |
run: | | |
echo "::set-output name=architecture::$(echo ${{ matrix.architecture }} | sed 's/\//-/g')" | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: evilbpf-bin-${{ github.sha }}-${{ steps.reformat_architecture.outputs.architecture }} | |
path: | | |
docker/src/dst | |
# This is so slow ... i hate ARM emul |