Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,19 @@ jobs:
run_test_workflow:
- "!?(site|release-notes)/**"

# Dedicated job to store go modules in cache due to the write permissions
go-mod-download:
runs-on: ubuntu-22.04
permissions:
actions: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./tools/github-actions/go-mod-download

lint:
runs-on: ubuntu-22.04
needs:
- go-mod-download
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./tools/github-actions/setup-deps
Expand All @@ -50,13 +61,17 @@ jobs:

gen-check:
runs-on: ubuntu-22.04
needs:
- go-mod-download
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./tools/github-actions/setup-deps
- run: make -k gen-check

license-check:
runs-on: ubuntu-latest
needs:
- go-mod-download
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./tools/github-actions/setup-deps
Expand All @@ -69,6 +84,7 @@ jobs:
id-token: write # for fetching OIDC token
needs:
- changes
- go-mod-download
if: ${{ github.event_name != 'pull_request' || needs.changes.outputs.run_test_workflow == 'true' }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand Down Expand Up @@ -107,7 +123,7 @@ jobs:

build:
runs-on: ubuntu-latest
needs: [changes, lint, gen-check, license-check, coverage-test]
needs: [changes, go-mod-download, lint, gen-check, license-check, coverage-test]
if: ${{ github.event_name != 'pull_request' || needs.changes.outputs.run_test_workflow == 'true' }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand All @@ -126,6 +142,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- changes
- go-mod-download
- build
if: ${{ github.event_name != 'pull_request' || needs.changes.outputs.run_test_workflow == 'true' }}
strategy:
Expand Down Expand Up @@ -179,6 +196,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- changes
- go-mod-download
- build
if: ${{ github.event_name != 'pull_request' || needs.changes.outputs.run_test_workflow == 'true' }}
strategy:
Expand Down Expand Up @@ -242,6 +260,7 @@ jobs:
needs:
- build
- changes
- go-mod-download
# There's a different workflow for benchmark-test on push.
# So we need to check if this is a pull request and changes.
if: ${{ github.event_name == 'pull_request' && needs.changes.outputs.run_test_workflow == 'true' }}
Expand Down Expand Up @@ -276,6 +295,7 @@ jobs:
needs:
- build
- changes
- go-mod-download
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./tools/github-actions/setup-deps
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ permissions:


jobs:
# Dedicated job to store go modules in cache due to the write permissions
go-mod-download:
runs-on: ubuntu-22.04
permissions:
actions: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./tools/github-actions/go-mod-download

analyze:
name: Analyze
runs-on: 'ubuntu-22.04'
Expand All @@ -29,7 +38,8 @@ jobs:
matrix:
language:
- go

needs:
- go-mod-download
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,19 @@ permissions:
contents: read

jobs:
# Dedicated job to store go modules in cache due to the write permissions
go-mod-download:
runs-on: ubuntu-22.04
permissions:
actions: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./tools/github-actions/go-mod-download

docs-lint:
runs-on: ubuntu-22.04
needs:
- go-mod-download
steps:
- name: Check out code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand Down
4 changes: 2 additions & 2 deletions examples/extension-server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI=
github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ=
github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo=
github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ require (
github.com/go-openapi/strfmt v0.24.0
github.com/go-openapi/validate v0.25.0
github.com/golang/protobuf v1.5.4
github.com/google/cel-go v0.26.0
github.com/google/cel-go v0.26.1
github.com/google/go-cmp v0.7.0
github.com/google/go-containerregistry v0.20.6
github.com/klauspost/compress v1.18.1
Expand Down Expand Up @@ -80,7 +80,7 @@ require (
k8s.io/klog/v2 v2.130.1
k8s.io/kube-openapi v0.0.0-20250814151709-d7b6acb124c3
k8s.io/kubectl v0.34.1
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
sigs.k8s.io/controller-runtime v0.22.3
sigs.k8s.io/gateway-api v1.4.0
sigs.k8s.io/kubectl-validate v0.0.5-0.20250915070809-d2f2d68fba09
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI=
github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ=
github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo=
github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
Expand Down Expand Up @@ -928,8 +928,8 @@ k8s.io/kubectl v0.34.1 h1:1qP1oqT5Xc93K+H8J7ecpBjaz511gan89KO9Vbsh/OI=
k8s.io/kubectl v0.34.1/go.mod h1:JRYlhJpGPyk3dEmJ+BuBiOB9/dAvnrALJEiY/C5qa6A=
k8s.io/metrics v0.34.1 h1:374Rexmp1xxgRt64Bi0TsjAM8cA/Y8skwCoPdjtIslE=
k8s.io/metrics v0.34.1/go.mod h1:Drf5kPfk2NJrlpcNdSiAAHn/7Y9KqxpRNagByM7Ei80=
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0=
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck=
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
oras.land/oras-go/v2 v2.6.0 h1:X4ELRsiGkrbeox69+9tzTu492FMUu7zJQW6eJU+I2oc=
oras.land/oras-go/v2 v2.6.0/go.mod h1:magiQDfG6H1O9APp+rOsvCPcW1GD2MM7vgnKY0Y+u1o=
periph.io/x/host/v3 v3.8.5 h1:g4g5xE1XZtDiGl1UAJaUur1aT7uNiFLMkyMEiZ7IHII=
Expand Down
16 changes: 16 additions & 0 deletions tools/github-actions/go-mod-download/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: go-mod-download
description: Install host system dependencies

runs:
using: composite
steps:
- uses: ./tools/github-actions/setup-deps
- name: Download Go modules
shell: bash
run: |
set -euo pipefail
find . -name go.mod -print | sort | while read -r mod; do
dir=$(dirname "$mod")
echo "Downloading Go modules in ${dir:-.}"
(cd "${dir:-.}" && go mod download)
done
3 changes: 2 additions & 1 deletion tools/github-actions/setup-deps/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ runs:
steps:
- shell: bash
run: sudo apt-get install libbtrfs-dev -y
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v5.0.1
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
cache: true
cache-dependency-path: "**/go.sum"
2 changes: 1 addition & 1 deletion tools/make/golang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ifeq ($(origin GOBIN), undefined)
GOBIN := $(GOPATH)/bin
endif

GO_VERSION = $(shell grep -oE "^go [[:digit:]]*\.[[:digit:]]*" go.mod | cut -d' ' -f2)
GO_VERSION = $(shell grep -oE "^go [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*" go.mod | cut -d' ' -f2)

# Build the target binary in target platform.
# The pattern of build.% is `build.{Platform}.{Command}`.
Expand Down
Loading