Merge pull request #127 from junotx/prepare-0.7.0 #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |