Merge pull request #38 from DIMO-Network/dependabot/github_actions/ac… #103
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: generate files | |
| on: | |
| pull_request: | |
| branches: ["**"] | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| generate: | |
| # Condition to skip merge commits | |
| if: "!contains(github.event.head_commit.message, 'Merge pull request')" | |
| runs-on: ubuntu-latest | |
| name: lint | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: go mod tidy | |
| run: go mod tidy | |
| - name: go mod verify | |
| run: go mod verify | |
| - name: install tools | |
| run: make tools | |
| - name: generate files | |
| run: make generate | |
| - name: porcelain | |
| shell: bash | |
| run: | | |
| dirty_files="$(git status --porcelain)" | |
| if [[ `git status --porcelain` ]]; then | |
| echo "The following files are dirty after running generators:" | |
| echo "${dirty_files}" | |
| exit 1 | |
| fi |