Repository navigation
Add support for projects in namespace commands #340
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: Check Generated Files | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| verify-generation: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 | |
| - name: Set up Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 | |
| with: | |
| go-version-file: "go.mod" | |
| check-latest: true | |
| cache: false | |
| - name: Add Go bin to PATH | |
| run: echo "$HOME/go/bin" >> $GITHUB_PATH | |
| - name: Run commands generation command | |
| run: make gen | |
| - name: Verify no changes were generated | |
| run: | | |
| # Check if there are any uncommitted changes in the working directory | |
| if [ -z "$(git status --porcelain)" ]; then | |
| echo "::notice::Generated files are up to date. No changes detected." | |
| else | |
| echo "::error::Detected uncommitted changes after running the generation command. Please run the generator and commit the changes." | |
| git status | |
| git diff | |
| exit 1 | |
| fi | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: verify-generation | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 | |
| - name: Set up Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 | |
| with: | |
| go-version-file: "go.mod" | |
| check-latest: true | |
| cache: false | |
| - name: Build the cli binary | |
| run: make build |