Skip to content

build(deps): Bump docker/setup-buildx-action from 2 to 3 (#941) #60

build(deps): Bump docker/setup-buildx-action from 2 to 3 (#941)

build(deps): Bump docker/setup-buildx-action from 2 to 3 (#941) #60

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@v3
- 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 }}