Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 0 additions & 69 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,72 +166,3 @@ jobs:
gh release upload "${GITHUB_REF#refs/tags/}" deploy/falcon-operator.yaml
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

build-multiarch-operator:
name: Build multi-architecture image
needs: create_release
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [1.22.x]

steps:
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go

# Checkout falcon-operator github repository
- name: Checkout falcon-operator project
uses: actions/checkout@v4

- name: Create proper tag version
id: set_version
run: |
VERSION=${{ env.RELEASE_TAG }}
IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')

echo "VERSION=${VERSION:1}" >> $GITHUB_ENV
echo "IMAGE_REPOSITORY=${IMAGE_REPOSITORY}" >> $GITHUB_ENV

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ secrets.REGISTRY_LOGIN }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Setup Cross Compile Dockerfile
run: sed -e '1 s/\(^FROM\)/FROM --platform=$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross

- name: Build and push
id: build_image_multiarch
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile.cross
platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
push: true
tags: |
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPOSITORY }}:${{ env.VERSION }}
build-args: |
VERSION=${{ env.VERSION }}

- name: Check manifest
run: |
docker buildx imagetools inspect ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPOSITORY }}:${{ env.VERSION }}