Skip to content

GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.

ci: add ARMv7 Docker and release builds

Aldino Kemale90a8f10b123
diff --git a/.github/workflows/build-docker-image.yaml b/.github/workflows/build-docker-image.yaml
index 7743b1c6..774ebe97 100644
--- a/.github/workflows/build-docker-image.yaml
+++ b/.github/workflows/build-docker-image.yaml
@@ -37,14 +37,26 @@ jobs:
push: true
context: .
file: ./docker/golang.Dockerfile
+ platforms: linux/amd64
tags: |
${{ secrets.REGISTRY_USERNAME }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-amd
ghcr.io/${{ github.repository_owner }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-amd
build-and-push-arm:
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
+ name: Build and Push ARM (${{ matrix.suffix }})
environment: production
runs-on: ubuntu-24.04-arm
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - suffix: arm
+ platform: linux/arm64
+ qemu_platforms: ""
+ - suffix: armv7
+ platform: linux/arm/v7
+ qemu_platforms: arm
permissions:
contents: read
packages: write
@@ -61,6 +73,11 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
+ - name: Set up QEMU
+ if: matrix.qemu_platforms != ''
+ uses: docker/setup-qemu-action@v3
+ with:
+ platforms: ${{ matrix.qemu_platforms }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
@@ -69,9 +86,10 @@ jobs:
push: true
context: .
file: ./docker/golang.Dockerfile
+ platforms: ${{ matrix.platform }}
tags: |
- ${{ secrets.REGISTRY_USERNAME }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-arm
- ghcr.io/${{ github.repository_owner }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-arm
+ ${{ secrets.REGISTRY_USERNAME }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-${{ matrix.suffix }}
+ ghcr.io/${{ github.repository_owner }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-${{ matrix.suffix }}
merge-manifest:
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
@@ -98,9 +116,11 @@ jobs:
run: |
docker buildx imagetools create -t ${{ secrets.REGISTRY_USERNAME }}/go-whatsapp-web-multidevice:${{ github.ref_name }} \
${{ secrets.REGISTRY_USERNAME }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-amd \
- ${{ secrets.REGISTRY_USERNAME }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-arm
+ ${{ secrets.REGISTRY_USERNAME }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-arm \
+ ${{ secrets.REGISTRY_USERNAME }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-armv7
- name: Create Versioned Manifest (GHCR) (${{ github.ref_name }})
run: |
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/go-whatsapp-web-multidevice:${{ github.ref_name }} \
ghcr.io/${{ github.repository_owner }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-amd \
- ghcr.io/${{ github.repository_owner }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-arm
+ ghcr.io/${{ github.repository_owner }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-arm \
+ ghcr.io/${{ github.repository_owner }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-armv7
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index de445d95..898ce3c1 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -25,19 +25,22 @@ jobs:
sudo apt-get update
sudo apt-get install -y \
gcc-aarch64-linux-gnu \
+ gcc-arm-linux-gnueabihf \
gcc-mingw-w64 \
+ libc6-dev-armhf-cross \
libc6-dev-i386-cross \
gcc-i686-linux-gnu
- name: Install GoReleaser
- uses: goreleaser/goreleaser-action@v5
+ uses: goreleaser/goreleaser-action@v7
with:
- version: latest
+ version: "~> v2"
install-only: true
- name: Create Linux/Windows GoReleaser config
run: |
cat > /tmp/.goreleaser-linux-windows.yml << 'EOF'
+ version: 2
project_name: whatsapp
builds:
@@ -66,6 +69,21 @@ jobs:
- arm64
ldflags: -s -w
binary: "{{ .Os }}-{{ .Arch }}"
+
+ - id: linux-armv7
+ dir: ./src
+ main: .
+ env:
+ - CGO_ENABLED=1
+ - CC=arm-linux-gnueabihf-gcc
+ goos:
+ - linux
+ goarch:
+ - arm
+ goarm:
+ - "7"
+ ldflags: -s -w
+ binary: "{{ .Os }}-{{ .Arch }}v{{ .Arm }}"
- id: linux-386
dir: ./src
@@ -108,14 +126,16 @@ jobs:
archives:
- id: binaries
- builds:
+ ids:
- linux-amd64
- linux-arm64
+ - linux-armv7
- linux-386
- windows-amd64
- windows-386
- format: zip
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
+ formats:
+ - zip
+ name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}"
checksum:
name_template: "checksums.txt"
@@ -130,7 +150,7 @@ jobs:
- name: Run GoReleaser for Linux/Windows
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: goreleaser release --config /tmp/.goreleaser-linux-windows.yml --clean --timeout 60m --skip-validate
+ run: goreleaser release --config /tmp/.goreleaser-linux-windows.yml --clean --timeout 60m --skip=validate
build-macos:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
@@ -146,14 +166,15 @@ jobs:
go-version: "1.25"
- name: Install GoReleaser
- uses: goreleaser/goreleaser-action@v5
+ uses: goreleaser/goreleaser-action@v7
with:
- version: latest
+ version: "~> v2"
install-only: true
- name: Create macOS GoReleaser config
run: |
cat > /tmp/.goreleaser-macos.yml << 'EOF'
+ version: 2
project_name: whatsapp
builds:
@@ -183,10 +204,11 @@ jobs:
archives:
- id: binaries
- builds:
+ ids:
- darwin-amd64
- darwin-arm64
- format: zip
+ formats:
+ - zip
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
checksum:
@@ -202,4 +224,4 @@ jobs:
- name: Run GoReleaser for macOS
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: goreleaser release --config /tmp/.goreleaser-macos.yml --timeout 60m --skip-validate
+ run: goreleaser release --config /tmp/.goreleaser-macos.yml --clean --timeout 60m --skip=validate