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-operator image
on:
push:
branches:
- 'master'
tags:
- 'v*'
paths:
- ".github/workflows/build-op-image.yaml"
- "cmd/operator/**"
- "hack/**"
- "pkg/**"
- "Makefile"
env:
REPO_OPERATOR: 'kubesphere'
jobs:
operator-build:
runs-on: ubuntu-latest
timeout-minutes: 30
name: Build Image for kube-events-operator
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-operator
run: |
make cross-build-operator -e REPO_OPERATOR=${{ env.REPO_OPERATOR }}/kube-events-operator