rbac-gen.yaml 1014 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Generate RBAC from Helm charts
  2. on:
  3. push:
  4. tags:
  5. - v*
  6. branches:
  7. - master
  8. - release-*
  9. pull_request:
  10. branches:
  11. - master
  12. - release-*
  13. defaults:
  14. run:
  15. # reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
  16. shell: bash --noprofile --norc -eo pipefail -x {0}
  17. # cancel the in-progress workflow when PR is refreshed.
  18. concurrency:
  19. group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
  20. cancel-in-progress: true
  21. permissions:
  22. contents: read
  23. jobs:
  24. gen-rbac:
  25. runs-on: ubuntu-20.04
  26. steps:
  27. - name: checkout
  28. uses: actions/checkout@v4
  29. with:
  30. fetch-depth: 0
  31. - uses: actions/setup-go@v4
  32. with:
  33. go-version: "1.21"
  34. - name: run gen-rbac
  35. run: GOPATH=$(go env GOPATH) make gen-rbac
  36. - name: validate gen-rbac
  37. run: tests/scripts/validate_modified_files.sh gen-rbac