Skip to content

Commit

Permalink
Create release-alpine.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Jun 28, 2024
1 parent fb343a9 commit 50712a7
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release-alpine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release Binary/Images (alpine)

on:
workflow_dispatch:
# release:
# types: [created, published]

env:
REGISTRY: ghcr.io
CROSS_SYSROOT: /mnt/alpine

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Alpine Linux for x86_64 (build arch)
uses: jirutka/setup-alpine@v1
with:
arch: x86_64
packages: >
build-base
pkgconf
linux-headers
musl-dev
gcc
libpcap-dev
ca-certificates
git
go
volumes: ${{ steps.alpine-target.outputs.root-path }}:${{ env.CROSS_SYSROOT }}
shell-name: alpine.sh

- name: Install LuaJit 2.1
run: |
git clone https://luajit.org/git/luajit-2.0.git \
&& cd luajit-2.0 \
&& git checkout v2.1 \
&& make CCOPT="-static -fPIC" BUILDMODE="static" && make install
shell: alpine.sh {0}

- name: Build
run: CGO_ENABLED=1 GOOS=linux go build -a --ldflags '-linkmode external -extldflags "-static -s -w"' -o /home/runner/work/heplify .
shell: alpine.sh {0}

0 comments on commit 50712a7

Please sign in to comment.