Skip to content

Commit

Permalink
Merge pull request #34 from digitalocean/ndombroski/static-checks
Browse files Browse the repository at this point in the history
Fix various static checks in CI
  • Loading branch information
ndombroski authored May 31, 2024
2 parents 3a2835c + 36cb325 commit fe607dc
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-envtest-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fe607dc

Please sign in to comment.