Skip to content

Merge pull request #922 from wenchajun/release-2.5 #59

Merge pull request #922 from wenchajun/release-2.5

Merge pull request #922 from wenchajun/release-2.5 #59

Workflow file for this run

name: Building Fluentd image
on:
push:
branches:
- 'master'
tags:
- 'v*'
paths:
- ".github/workflows/build-fd-image.yaml"
- "cmd/fluent-watcher/fluentd/**"
- "cmd/fluent-watcher/hooks/**"
- "pkg/filenotify/**"
env:
FD_IMG: 'kubesphere/fluentd:v1.15.3'
ARCH: '-arm64'
FD_IMG_BASE: 'kubesphere/fluentd:v1.15.3-arm64-base'
jobs:
build-amd64:
runs-on: ubuntu-latest
timeout-minutes: 30
name: Build amd64 Image for Fluentd
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and Push amd64 Image for Fluentd
run: |
make build-fd-amd64 -e FD_IMG=${{ env.FD_IMG }}
docker push ${{ env.FD_IMG }}
build-arm64:
runs-on: ubuntu-latest
timeout-minutes: 90
name: Build arm64 Image for Fluentd
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- 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 arm64 base Image for Fluentd
run: |
make build-fd-arm64-base -e FD_IMG_BASE=${{ env.FD_IMG_BASE }}
- name: Build and Push arm64 Image for Fluentd
run: |
make build-fd-arm64 -e FD_IMG=${{ env.FD_IMG }} -e ARCH=${{ env.ARCH }}