Merge pull request #7 from starcat-app/dev #20
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*'] | |
| paths-ignore: | |
| - '**/*.md' | |
| - 'LICENSE' | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - '.github/PULL_REQUEST_TEMPLATE.md' | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - '**/*.md' | |
| - 'LICENSE' | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - '.github/PULL_REQUEST_TEMPLATE.md' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| quality: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Verify dependencies | |
| run: make deps | |
| - name: Run quality checks | |
| run: make check | |
| # 宿主机编译不会应用 .dockerignore;必须构建真实镜像上下文,避免遗漏源码目录。 | |
| - name: Build Docker image | |
| run: docker build --build-arg VERSION=0.0.0-ci --tag starcat-discovery-api:ci . | |
| - name: Build server | |
| run: make build |