amd64 build #99
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: Docker | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# - name: Install LLVM and Clang | |
# uses: KyleMayes/install-llvm-action@v2 | |
# with: | |
# version: "17" | |
# # arch: "x64" | |
# arch: "arm64" | |
# - name: Setup Go | |
# uses: actions/setup-go@v5 | |
# - name: Build | |
# run: | | |
# go generate ./... | |
# GOOS=linux GOARCH=arm64 go build -o router-monitor ./cmd/ebpf-firewall | |
# - name: Create release tarball | |
# if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
# run: | | |
# chmod +x router-monitor | |
# tar czf router-monitor-aarch64-linux.tar.gz router-monitor | |
# - name: Create github release | |
# id: create_release | |
# uses: ncipollo/release-action@v1 | |
# if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
# with: | |
# artifacts: router-monitor-aarch64-linux.tar.gz | |
- uses: blesswinsamuel/github-actions/docker-build-and-push@main | |
with: | |
checkout: false | |
slack-webhook: ${{ secrets.SLACK_WEBHOOK }} | |
docker-build-platforms: linux/amd64 | |
- name: Create release tarball | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
docker create ghcr.io/${{ github.repository }} > /tmp/container_id | |
docker cp $(cat /tmp/container_id):/bin/ebpf-firewall ./router-monitor | |
chmod +x router-monitor | |
tar czf router-monitor-aarch64-linux.tar.gz router-monitor | |
- name: Create github release | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
with: | |
artifacts: router-monitor-aarch64-linux.tar.gz |