diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..076bc4e --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,19 @@ +--- +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily + + - package-ecosystem: gomod + directory: / + schedule: + interval: daily + allow: + - dependency-type: all + + - package-ecosystem: docker + directory: / + schedule: + interval: daily diff --git a/.github/stale.yaml b/.github/stale.yaml new file mode 100644 index 0000000..32de51c --- /dev/null +++ b/.github/stale.yaml @@ -0,0 +1,56 @@ +--- +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 90 + +# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. +daysUntilClose: 21 + +# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) +onlyLabels: [] + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: + - "bug" + +# Set to true to ignore issues in a project (defaults to false) +exemptProjects: false + +# Set to true to ignore issues in a milestone (defaults to false) +exemptMilestones: false + +# Set to true to ignore issues with an assignee (defaults to false) +exemptAssignees: false + +# Label to use when marking as stale +staleLabel: stale + +# Comment to post when marking as stale. Set to `false` to disable +markComment: This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions. +# Comment to post when removing the stale label. +# unmarkComment: > +# Your comment here. + +# Comment to post when closing a stale Issue or Pull Request. +# closeComment: > +# Your comment here. + +# Limit the number of actions per hour, from 1-30. Default is 30 +limitPerRun: 30 + +# Limit to only `issues` or `pulls` +# only: issues + +# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': +# pulls: +# daysUntilStale: 30 +# markComment: > +# This pull request has been automatically marked as stale because it has not had +# recent activity. It will be closed if no further activity occurs. Thank you +# for your contributions. + +# issues: +# exemptLabels: +# - confirmed diff --git a/.github/workflows/govuln.yaml b/.github/workflows/govuln.yaml new file mode 100644 index 0000000..eeeddb5 --- /dev/null +++ b/.github/workflows/govuln.yaml @@ -0,0 +1,16 @@ +--- +name: Go Vulnerability Checker +on: [push, pull_request] +permissions: read-all +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 + with: + go-version: 1.22.6 + - run: | + set -euo pipefail + + go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck ./... diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml new file mode 100644 index 0000000..249438b --- /dev/null +++ b/.github/workflows/unit-test.yaml @@ -0,0 +1,16 @@ +--- +name: Unit tests +on: [push, pull_request] +permissions: + contents: read +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 + with: + go-version: 1.22.6 + - name: tests + run: | + make test diff --git a/Dockerfile b/Dockerfile index 42149ca..75a9cbc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.22.5 AS builder +FROM golang:1.22.6 AS builder ARG TARGETOS ARG TARGETARCH diff --git a/go.mod b/go.mod index 6487194..f0131c2 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,9 @@ module github.com/netbox-community/netbox-operator -go 1.22.5 +go 1.22.0 + +toolchain go1.22.6 require ( github.com/go-openapi/runtime v0.28.0