Repository navigation
chore(deps): update tufcli-init to 883ef13 #12076
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: linter | |
| on: | |
| pull_request: | |
| branches: [ "main", "release*" ] | |
| paths-ignore: | |
| - '*.md' | |
| - 'LICENSE' | |
| - 'OWNERS' | |
| - '.tekton/**' | |
| - 'docs/**' | |
| - 'renovate.json' | |
| jobs: | |
| golangci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Install Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Build custom golangci-lint | |
| run: | | |
| make custom-golangci-lint | |
| install ./bin/custom-gcl /usr/local/bin/golangci-lint | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 | |
| with: | |
| install-mode: none | |
| version: v2.13.2 | |
| args: --verbose --timeout=15m | |
| only-new-issues: true | |
| crdify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Install tools | |
| run: | | |
| go install sigs.k8s.io/crdify@v0.5.0 | |
| go install sigs.k8s.io/kustomize/kustomize/v5@v5.6.0 | |
| - name: Build kustomized CRDs | |
| run: | | |
| BASE_REPO="${{ github.event.pull_request.base.repo.full_name }}" | |
| HEAD_REPO="${{ github.event.pull_request.head.repo.full_name }}" | |
| mkdir -p /tmp/crd-base /tmp/crd-head | |
| kustomize build "https://github.com/${BASE_REPO}//config/crd?ref=${{ github.event.pull_request.base.sha }}" -o /tmp/crd-base/ | |
| kustomize build "https://github.com/${HEAD_REPO}//config/crd?ref=${{ github.event.pull_request.head.sha }}" -o /tmp/crd-head/ | |
| - name: Compare CRDs | |
| run: | | |
| FAILED=0 | |
| for crd in /tmp/crd-head/*_customresourcedefinition_*.yaml; do | |
| NAME=$(basename "$crd") | |
| echo "--- Comparing ${NAME} ---" | |
| if [ ! -f "/tmp/crd-base/${NAME}" ]; then | |
| echo "Skipping: not present in base (new CRD)" | |
| continue | |
| fi | |
| if ! crdify --config=crdify.yaml "file:///tmp/crd-base/${NAME}" "file://${crd}"; then | |
| FAILED=1 | |
| fi | |
| done | |
| for crd in /tmp/crd-base/*_customresourcedefinition_*.yaml; do | |
| NAME=$(basename "$crd") | |
| if [ ! -f "/tmp/crd-head/${NAME}" ]; then | |
| echo "ERROR: CRD ${NAME} removed in head" | |
| FAILED=1 | |
| fi | |
| done | |
| exit $FAILED | |
| generated: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Install Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Regenerate committed generated files | |
| run: make manifests generate update-ctfe-configpb | |
| - name: Check for uncommitted changes | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| git status --short | |
| git diff | |
| echo "::error::Generated files are out of date. Run 'make manifests generate' and commit the result." | |
| exit 1 | |
| fi |