feat: Add validating admission webhook for TTL annotation validation #152
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: PR - Check | |
| on: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| lint: | |
| name: Run on Ubuntu | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install pre-commit | |
| run: sudo apt-get update -y && sudo apt-get install -y pre-commit codespell gitleaks | |
| - name: Install golangci/golangci-lint | |
| run: | | |
| export GOLANGCI_LINT_VERSION=2.6.2 | |
| curl -sSLO "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz" | |
| tar -xzf golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz -C /tmp | |
| mv /tmp/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64/golangci-lint /usr/local/bin/golangci-lint | |
| rm -rf /tmp/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64* golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz | |
| - name: Clone the code | |
| uses: actions/checkout@v6 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Check commits | |
| run: pre-commit run --hook-stage manual --all-files |