Skip to content

feat: Add IPAM integration #1155

feat: Add IPAM integration

feat: Add IPAM integration #1155

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
env:
CGO_ENABLED: 0
GO_VERSION: '1.25'
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
validate:
name: "Validate ${{ matrix.target }}"
runs-on: ubuntu-latest
strategy:
matrix:
target: ["verify", "lint", "test"]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: "${{ env.GO_VERSION }}"
cache: true
- uses: actions/cache@v4
with:
path: bin
key: ${{ runner.os }}-tools-bin-${{ matrix.target }}-${{ hashFiles('Makefile') }}
restore-keys: |
${{ runner.os }}-tools-bin-${{ matrix.target }}-
${{ runner.os }}-tools-bin-
- name: ${{ matrix.target }}
run: make ${{ matrix.target }}
build:
name: Build binaries and container images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: "${{ env.GO_VERSION }}"
cache: true
- name: Build
run: make build-image
build-push-image:
name: Build and push image
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- validate
- build
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-tags: true
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: "${{ env.GO_VERSION }}"
cache: true
- uses: ko-build/setup-ko@v0.9
- run: ko login ${{ env.REGISTRY }} -u ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
run: make build-image-push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IS_RELEASE: true
GORELEASER_EXTRA_FLAGS: "--skip=validate --snapshot"