Skip to content

Bump actions/setup-go from 4 to 5 (#140) #30

Bump actions/setup-go from 4 to 5 (#140)

Bump actions/setup-go from 4 to 5 (#140) #30

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