forked from TencentBlueKing/bk-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 937 Bytes
/
agent.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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-20.04
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/