fix build alpine

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing
2025-08-21 16:54:56 +02:00
parent 0c45cc1e12
commit 0f09205814
2 changed files with 8 additions and 6 deletions

View File

@@ -46,10 +46,11 @@ jobs:
sudo docker run --rm \
-v "$(pwd)":/app \
-w /app/backend \
-e CGO_ENABLED=1 \
golang:alpine \
go build -trimpath \
-ldflags="-X github.com/phishingclub/phishingclub/version.hash=ph${{ steps.get_version.outputs.HASH }} -X github.com/phishingclub/phishingclub/version.version=${{ steps.get_version.outputs.VERSION }}" \
-tags production -o ../build/phishingclub main.go
sh -c "apk add --no-cache gcc musl-dev && go build -trimpath \
-ldflags='-X github.com/phishingclub/phishingclub/version.hash=ph${{ steps.get_version.outputs.HASH }} -X github.com/phishingclub/phishingclub/version.version=${{ steps.get_version.outputs.VERSION }}' \
-tags production -o ../build/phishingclub main.go"
- name: Fix build directory permissions
run: |

View File

@@ -44,10 +44,11 @@ jobs:
sudo docker run --rm \
-v "$(pwd)":/app \
-w /app/backend \
-e CGO_ENABLED=1 \
golang:alpine \
go build -trimpath \
-ldflags="-X github.com/phishingclub/phishingclub/version.hash=ph${{ steps.get_version.outputs.HASH }} -X github.com/phishingclub/phishingclub/version.version=${{ steps.get_version.outputs.VERSION }}" \
-tags production -o ../build/phishingclub main.go
sh -c "apk add --no-cache gcc musl-dev && go build -trimpath \
-ldflags='-X github.com/phishingclub/phishingclub/version.hash=ph${{ steps.get_version.outputs.HASH }} -X github.com/phishingclub/phishingclub/version.version=${{ steps.get_version.outputs.VERSION }}' \
-tags production -o ../build/phishingclub main.go"
- name: Fix build directory permissions
run: |