feat(ci): remove Cgo dependencies, cross compile without QEMU, upload static binaries

This commit is contained in:
sentriz
2025-09-29 14:41:40 +01:00
parent 58c2933355
commit e3db819d8f
7 changed files with 73 additions and 130 deletions

No files matched your search

+8 -18
View File
@@ -22,16 +22,12 @@ jobs:
if: ${{ needs.check-date.outputs.should_run == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v5
with:
go-version-file: go.mod
- name: Install dependencies
run: |
sudo apt update -qq
sudo apt install -y -qq build-essential git sqlite3 libtag1-dev ffmpeg mpv zlib1g-dev
- name: Lint
uses: golangci/golangci-lint-action@v8
with:
@@ -39,21 +35,15 @@ jobs:
version: v2.4.0
- name: Test
run: go test ./...
build-release:
build-docker:
name: Build and release Docker image
needs: [check-date, test]
if: ${{ needs.check-date.outputs.should_run == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
@@ -68,11 +58,11 @@ jobs:
_short_hash=${{ github.sha }}
echo "SHORT_HASH=${_short_hash:0:7}" >> $GITHUB_ENV
- name: Build and Push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ env.SHORT_HASH }}