-
Notifications
You must be signed in to change notification settings - Fork 31
52 lines (44 loc) · 1.22 KB
/
build-exporter-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
name: Building kube-events-exporter image
on:
push:
branches:
- 'master'
tags:
- 'v*'
paths:
- ".github/workflows/build-exporter-image.yaml"
- "cmd/exporter/**"
- "hack/**"
- "pkg/**"
- "Makefile"
env:
REPO_EXPORTER: 'kubesphere'
jobs:
exporter-build:
runs-on: ubuntu-latest
timeout-minutes: 30
name: Build Image for kube-events-exporter
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push Image for kube-events-exporter
run: |
make cross-build-exporter -e REPO_EXPORTER=${{ env.REPO_EXPORTER }}/kube-events-exporter