Skip to content

Go Modules

Avrea caches Go modules so that go mod download resolves from colocated cache on repeat runs.

The module proxy is pre-configured:

Terminal window
GOPROXY="https://avrea-host:8443/gomod/,direct"

Your workflow needs no changes:

workflow.yml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.25'
cache: false # Use Avrea build cache instead
- run: go build ./...
Terminal window
export GOPROXY="https://avrea-host:8443/gomod/,direct"

The ,direct suffix ensures that if a module is not available through the cache, Go falls back to fetching directly from the source.