diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index c5bc952a..719dbd7f 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -19,12 +19,13 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5.0.1 with: go-version: ${{ matrix.go-version }} + cache: false - name: Checkout current branch - uses: actions/checkout@v2 + uses: actions/checkout@v4.1.6 with: fetch-depth: '0' @@ -34,7 +35,7 @@ jobs: echo "TEST_IMAGE=${TEST_IMAGE}" >> ${GITHUB_ENV} - name: Log in to the Docker Hub - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + uses: docker/login-action@v3.2.0 with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} diff --git a/.github/workflows/release-envtest-image.yml b/.github/workflows/release-envtest-image.yml index 44ce73e0..38ffc41b 100644 --- a/.github/workflows/release-envtest-image.yml +++ b/.github/workflows/release-envtest-image.yml @@ -36,10 +36,10 @@ jobs: steps: - name: Checkout current branch - uses: actions/checkout@v2 + uses: actions/checkout@v4.1.6 - name: Log in to the Docker Hub - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + uses: docker/login-action@v3.2.0 with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} diff --git a/.github/workflows/release-image.yml b/.github/workflows/release-image.yml index 09ee0ce7..935b892d 100644 --- a/.github/workflows/release-image.yml +++ b/.github/workflows/release-image.yml @@ -37,18 +37,19 @@ jobs: steps: - name: Checkout current branch - uses: actions/checkout@v2 + uses: actions/checkout@v4.1.6 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5.0.1 with: go-version: ${{ matrix.go-version }} + cache: false - name: Build image run : IMAGE=${{ env.IMAGE_NAME }} make build-image - name: Log in to the GitHub registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + uses: docker/login-action@v3.2.0 with: registry: ${{ env.GITHUB_REGISTRY }} username: ${{ github.actor }} @@ -61,7 +62,7 @@ jobs: docker push $GITHUB_TAG - name: Log in to the Docker Hub - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + uses: docker/login-action@v3.2.0 with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 50089d28..ab097695 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,12 +33,13 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5.0.1 with: go-version: ${{ matrix.go-version }} + cache: false - name: Checkout current branch - uses: actions/checkout@v2 + uses: actions/checkout@v4.1.6 - name: gofmt run : ./scripts/gofmt.sh @@ -50,7 +51,7 @@ jobs: run : revive -exclude vendor/... ./... - name: Install - run : go install honnef.co/go/tools/cmd/staticcheck@v0.3.0 + run : go install honnef.co/go/tools/cmd/staticcheck@v0.4.7 - name: Static check run : ./scripts/static-check.sh diff --git a/internal/controller/controller.go b/internal/controller/controller.go index d1ce8336..16362c6d 100644 --- a/internal/controller/controller.go +++ b/internal/controller/controller.go @@ -113,6 +113,7 @@ func WithNetBoxClient(client netbox.Client) Option { } } +// WithKubernetesClient sets the Kubernetes client to be used by the controller func WithKubernetesClient(client client.Client) Option { return func(s *Settings) error { s.KubeClient = client