Skip to content

Workflow file for this run

name: Hubble CLI tests
on:
pull_request:
paths-ignore:
- 'cilium-cli/**'
- 'Documentation/**'
- 'test/**'
# The push event is only used to recreate the golang cache for hubble-cli
push:
branches:
- main
- ft/main/**
paths-ignore:
- 'cilium-cli/**'
- 'Documentation/**'
- 'test/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
cancel-in-progress: true
jobs:
build-hubble-cli-release-binaries:
name: Build Hubble CLI release binaries
runs-on: ubuntu-22.04
steps:
- name: Checkout the repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
cache: false
# renovate: datasource=golang-version depName=go
go-version: 1.23.1
# Load Golang cache build from GitHub
- name: Load hubble-cli Golang cache build from GitHub
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: cache
with:
path: /tmp/.cache/hubble-cli
key: ${{ runner.os }}-go-hubble-cli-cache-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-hubble-cli-cache-
${{ runner.os }}-go-
- name: Create cache directories if they don't exist
if: ${{ steps.go-cache.outputs.cache-hit != 'true' }}
shell: bash
run: |
mkdir -p /tmp/.cache/hubble-cli/.cache/go-build
mkdir -p /tmp/.cache/hubble-cli/pkg
- name: Build hubble CLI release binaries
env:
GOCACHE: "/tmp/.cache/hubble-cli/.cache/go-build"
GOMODCACHE: "/tmp/.cache/hubble-cli/pkg"
run: |
make -C hubble local-release