Skip to content

Feature/metrics (#13) #45

Feature/metrics (#13)

Feature/metrics (#13) #45

Workflow file for this run

name: CI
on:
push:
permissions:
contents: read
packages: write
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Run unit tests
run: go test -v -coverprofile=coverage.txt ./...
- name: Build binary
run: CGO_ENABLED=0 go build -o envoy-proxy-bouncer .
- name: Log in to GHCR
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/[email protected]
with:
images: ghcr.io/kdwils/envoy-proxy-bouncer
tags: |
type=sha,format=long
type=ref,event=tag
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Build and publish Docker image
id: build-and-publish
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: ${{ github.ref == 'refs/heads/main' }}
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}