diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 0f5772c9..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: 2 -updates: - - package-ecosystem: github-actions - directory: / - schedule: - interval: weekly - - - package-ecosystem: gomod - directory: / - schedule: - interval: weekly - groups: - aws-sdk: - patterns: - - "github.com/aws/aws-sdk-go-v2*" - - - package-ecosystem: pip - directories: - - "**/*" - schedule: - interval: weekly - ignore: - - dependency-name: "boto3" - update-types: ["version-update:semver-patch"] - - - package-ecosystem: docker - directories: - - "**/*" - schedule: - interval: weekly diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index 9506c2c4..00000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,31 +0,0 @@ -change: - - head-branch: ["^change/"] - -enhancement: - - head-branch: ["^feature/", "^feat/", "^enhancement/", "^enh/"] - -bug: - - head-branch: ["^fix/", "^bug/"] - -chore: - - head-branch: ["^chore/"] - -tests: - - any: - - head-branch: ["^tests/", "^test/"] - - changed-files: - - any-glob-to-any-file: "tests/**/*" - - all: - - changed-files: - - all-globs-to-all-files: ["!tests/requirements.txt"] - -documentation: - - head-branch: ["^docs/", "^doc/"] - - changed-files: - - any-glob-to-any-file: "**/*.md" - -dependencies: - - head-branch: - ["^deps/", "^dep/", "^dependabot/", "pre-commit-ci-update-config"] - - changed-files: - - any-glob-to-any-file: ["go.mod", "go.sum"] diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml deleted file mode 100644 index 86948ba6..00000000 --- a/.github/workflows/dependabot-auto-merge.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Dependabot auto-merge -on: pull_request_target - -permissions: - contents: read - -jobs: - dependabot: - runs-on: ubuntu-24.04 - if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} - permissions: - pull-requests: write - contents: write - steps: - - name: Dependabot metadata - id: dependabot-metadata - uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0 - - - name: Enable auto-merge for Dependabot PRs - run: gh pr merge --auto --squash "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{ secrets.NGINX_PAT }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 1d1d1f38..514493bc 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -12,7 +12,14 @@ jobs: pull-requests: write # for actions/labeler to add labels runs-on: ubuntu-24.04 steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + sparse-checkout: | + labeler.yml + sparse-checkout-cone-mode: false + repository: nginxinc/k8s-common - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true + configuration-path: labeler.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 46032315..5b66fe09 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -31,6 +31,8 @@ jobs: - name: Lint Go uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0 + with: + version: v1.60.1 # renovate: datasource=github-releases depName=golangci/golangci-lint actionlint: name: Actionlint diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 76825036..7b7e86e2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,9 @@ repos: - id: check-symlinks - id: check-case-conflict - id: check-vcs-permalinks + - id: check-json + - id: pretty-format-json + args: [--autofix, --no-ensure-ascii] - id: mixed-line-ending args: [--fix=lf] - id: name-tests-test diff --git a/Makefile b/Makefile index d61bc3d8..ed8e78d3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ .DEFAULT_GOAL := build-goreleaser +# renovate: datasource=github-releases depName=golangci/golangci-lint +GOLANGCI_LINT_VERSION = v1.60.1 .PHONY: test test: @@ -6,7 +8,7 @@ test: .PHONY: lint lint: - docker run --pull always --rm -v $(shell pwd):/nginx-asg-sync -w /nginx-asg-sync -v $(shell go env GOCACHE):/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -v $(shell go env GOPATH)/pkg:/go/pkg golangci/golangci-lint:latest golangci-lint --color always run + docker run --pull always --rm -v $(shell pwd):/nginx-asg-sync -w /nginx-asg-sync -v $(shell go env GOCACHE):/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -v $(shell go env GOPATH)/pkg:/go/pkg golangci/golangci-lint:$(GOLANGCI_LINT_VERSION) golangci-lint --color always run nginx-asg-sync: @go version || (code=$$?; printf "\033[0;31mError\033[0m: unable to build locally, try using the parameter TARGET=container or TARGET=download\n"; exit $$code) diff --git a/renovate.json b/renovate.json index a436d666..8bf65f91 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,7 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "github>nginxinc/k8s-common" + "github>nginxinc/k8s-common", + "schedule:earlyMondays" ] }