Skip to content

Update dependencies #81

Update dependencies

Update dependencies #81

Workflow file for this run

name: CI/CD
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: ">=1.24"
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get tooling
run: |
go get golang.org/x/lint
go get honnef.co/go/tools/cmd/staticcheck
- name: build
run: go build -v -tags=gofuzz ./...
- name: vet
run: go vet ./...
continue-on-error: true
- name: staticcheck
run: ~/go/bin/staticcheck ./...
continue-on-error: true
- name: lint
run: ~/go/bin/golint -set_exit_status ./...
continue-on-error: true
- name: Go Test
run: go test -v -race ./...
build-and-publish-docker-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64/v8
push: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
tags: ghcr.io/projectlighthousecau/beacon:latest
cache-from: type=registry,ref=ghcr.io/projectlighthousecau/beacon:latest
cache-to: type=inline