Skip to content

Merge pull request #128 from wanjunlei/master #23

Merge pull request #128 from wanjunlei/master

Merge pull request #128 from wanjunlei/master #23

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@v3
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- 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 kube-events-exporter
run: |
make cross-build-exporter -e REPO_EXPORTER=${{ env.REPO_EXPORTER }}/kube-events-exporter