Files
hamview/.gitea/workflows/build.yaml
maze b1b6552b67
Some checks failed
Test and build / test (push) Successful in 1m13s
Test and build / build (arm, 6, linux) (push) Failing after 2m41s
Test and build / build (arm, 7, linux) (push) Failing after 2m39s
Test and build / build (amd64, , linux) (push) Failing after 2m44s
Use Go version from go.mod
2026-02-23 12:38:19 +01:00

86 lines
2.4 KiB
YAML

name: Test and build
on:
push:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
check-latest: false
#- name: golangci-lint
# uses: golangci/golangci-lint-action@v9
# with:
# go-version: ${{ matrix.go }}
# version: v2.6
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
goarm: ""
- goos: linux
goarch: arm
goarm: "6"
- goos: linux
goarch: arm
goarm: "7"
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
check-latest: false
- name: Set target variables
run: |
echo "GOOS=${{ matrix.goos }}" >> $GITHUB_ENV
echo "GOARCH=${{ matrix.goarch }}" >> $GITHUB_ENV
if [ -n "${{ matrix.goarm }}" ]; then
echo "GOARM=${{ matrix.goarm }}" >> $GITHUB_ENV
fi
- name: Download modules
run: go mod download
- name: Make build directory
run: mkdir -p build
- name: Build hamview-collector
run: go build -o build/hamview-collector.${{ matrix.goarch }}${{ matrix.goarm }} -v ./cmd/hamview-collector
- name: Build hamview-receiver
run: go build -o build/hamview-receiver.${{ matrix.goarch }}${{ matrix.goarm }} -v ./cmd/hamview-receiver
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Show env
run: env
- name: Log into Container Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY }}
username: ${{ vars.DEPLOY_USER }}
password: ${{ secrets.DEPLOY_TOKEN }}
- name: Build and push collector container
uses: docker/build-push-action@v6
with:
push: true
tags: hamview/collector:latest
context: cmd/hamview-collector
platforms: |
linux/amd64
- name: Build and push receiver container
uses: docker/build-push-action@v6
with:
push: true
tags: hamview/receiver:latest
context: cmd/hamview-receiver
platforms: |
linux/amd64
linux/arm/v6
linux/arm/v7