Skip to content

merge

merge #5

Workflow file for this run

name: CI
on:
push:
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v16
- name: Run unit tests
run: nix develop --command go test -v -coverprofile=coverage.txt ./...
- name: Build binary
run: nix develop --command go build .
- 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-gateway-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 }}