New Crowdin translations by GitHub Action (#1769) #2610
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: Mockery | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: codegen | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| jobs: | |
| mockery: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| cache: true | |
| go-version: 'stable' | |
| - name: Install Mockery | |
| run: | | |
| go install github.com/vektra/mockery/v3@latest | |
| - name: Generate mocks and commit | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| ~/go/bin/mockery | |
| if [ -z "$(git status --porcelain)" ]; then | |
| echo "mock 无变更,跳过提交" | |
| exit 0 | |
| fi | |
| git add -A | |
| git commit -m "chore: update mocks" | |
| git push origin HEAD:main |