-
Notifications
You must be signed in to change notification settings - Fork 252
53 lines (45 loc) · 1.27 KB
/
build-fb-image.yaml
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
43
44
45
46
47
48
49
50
51
52
53
name: Building Fluent Bit image
on:
push:
branches:
- 'master'
tags:
- 'v*'
paths:
- ".github/workflows/build-fb-image.yaml"
- "cmd/fluent-watcher/fluentbit/**"
- "cmd/fluent-watcher/hooks/**"
- "pkg/filenotify/**"
env:
FB_IMG: 'kubesphere/fluent-bit:v2.1.9'
FB_IMG_DEBUG: 'kubesphere/fluent-bit:v2.1.9-debug'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
name: Build Image for Fluent Bit
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Build and Push Image for Fluent Bit
run: |
make build-fb -e FB_IMG=${{ env.FB_IMG }}
make build-fb-debug -e FB_IMG_DEBUG=${{ env.FB_IMG_DEBUG }}