replaced HUB_OPERATOR_TOKEN with GITHUB_TOKEN #3472
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: RBAC validation | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| rbac-check: | |
| runs-on: ubuntu-latest | |
| name: Generate role permissions | |
| steps: | |
| - name: Checkout multiclusterhub | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Verify modules | |
| run: | | |
| go mod verify | |
| - name: Verify format | |
| run: | | |
| make fmt | |
| git diff --exit-code | |
| - name: Generate RBAC file | |
| run: | | |
| go generate | |
| - name: Regenerate role | |
| run: | | |
| make manifests | |
| - name: Check if files have changed | |
| run: | | |
| git diff | |
| FILES_CHANGED=$(git diff --name-only | wc -l) | |
| if [ "$FILES_CHANGED" != "0" ]; then echo "Remember to run go generate to update rbac"; exit 1; fi; |