与主干最新代码保持一致 #1359
This file contains 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: Agent CI | |
on: | |
push: | |
branches: [master] | |
paths: | |
- 'src/agent/agent/**' | |
- 'src/agent/common/**' | |
pull_request: | |
branches: [master, release-*] | |
paths: | |
- 'src/agent/agent/**' | |
- 'src/agent/common/**' | |
workflow_dispatch: | |
workflow_call: | |
inputs: | |
upload: | |
required: true | |
type: string | |
jobs: | |
build: | |
name: Build agent | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19.6 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('src/agent/agent/go.sum') }} | |
- run: make BUILD_OUT_TAG=out clean all | |
working-directory: src/agent/agent/ | |
- uses: actions/upload-artifact@v4 | |
if: ${{ inputs.upload == 'true' }} | |
with: | |
name: agent | |
path: src/agent/agent/bin/ |