Skip to content

build for amd64

build for amd64 #122

Workflow file for this run

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/router-monitor
# - 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 --platform linux/amd64 ghcr.io/${{ github.repository }} > /tmp/container_id
docker cp $(cat /tmp/container_id):/bin/router-monitor ./router-monitor
chmod +x router-monitor
tar czf router-monitor-amd64-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-amd64-linux.tar.gz