Harden TLS, Grafana credentials, and database error handling for GH 1.8 (#2841) #12072
Workflow file for this run
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: Go | |
| on: | |
| workflow_dispatch: {} | |
| pull_request: | |
| branches: | |
| - main | |
| - release-* | |
| push: | |
| branches: | |
| - main | |
| - release-* | |
| jobs: | |
| format: | |
| name: format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| - name: Setup Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 | |
| with: | |
| go-version: '1.26' | |
| - name: Setup format tools | |
| run: go install tool | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9 | |
| with: | |
| version: v2.7.2 | |
| install-mode: goinstall | |
| - name: format | |
| run: make strict-fmt | |
| verify-bundle: | |
| name: verify bundle | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| - name: bundle | |
| run: cd operator && make bundle | |
| - name: compare bundle with stolostron/multicluster-global-hub-operator-bundle | |
| run: | | |
| # This comparation ensures the bundle keeps consistent. | |
| # ignore createdAt updated in csv by `make bundle` | |
| git checkout . -f | |
| # clone multicluster-global-hub-operator-bundle repo | |
| git clone https://github.com/stolostron/multicluster-global-hub-operator-bundle.git -b release-1.8 | |
| # compare the bundle dir | |
| diff -I 'createdAt' -ruN operator/bundle multicluster-global-hub-operator-bundle/bundle | |
| scorecard-test: | |
| name: bundle scorecard test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| - name: Create k8s Kind Cluster | |
| uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1 | |
| - name: Download operator-sdk | |
| uses: drmendes/setup-k8s-operator-sdk@576d2bf133e6b89a808063375f56c892475627aa # v1.1.5 | |
| with: | |
| version: "^1.34.1" | |
| - name: scorecard | |
| run: cd operator && operator-sdk scorecard ./bundle/ |