Skip to content
Open
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:

on:
pull_request:
branches: [main]
branches: [no-launch]
paths-ignore: ['docs/**']

workflow_dispatch:
Expand Down
32 changes: 12 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
name: 🚀 Release
permissions: read-all

on:
release:
types:
- created
on: push

env:
REGISTRY: ghcr.io
Expand All @@ -24,7 +21,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Check bundle generation 🧪
- name: 🧪 Check bundle generation
run: |
make bundle IMAGE_TAG_BASE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

Expand All @@ -44,17 +41,6 @@ jobs:
run: |
echo "version: ${{ needs.release.outputs.version }}"
echo "user_agent_version: ${{ needs.release.outputs.user_agent_version }}"
echo "tag_name: ${{ github.event.release.tag_name }}"

if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.version }}" ]; then
echo "Version in Makefile does not match release tag"
exit 1
fi

if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.user_agent_version }}" ]; then
echo "Version in main.go/USER_AGENT_VERSION does not match release tag"
exit 1
fi

build:
name: 🛠️ Build Operator images
Expand All @@ -76,16 +62,22 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: 🏗️ Build and push Operator image
run: |
make docker-build IMAGE_TAG_BASE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
make docker-build-and-push-multiarch IMAGE_TAG_BASE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
make docker-push IMAGE_TAG_BASE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: 🏗️ Build and push Operator bundle
- name: 🏗️ Build and push Operator bundle image
run: |
make bundle IMAGE_TAG_BASE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
make bundle-build IMAGE_TAG_BASE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
make bundle-build-and-push-multiarch IMAGE_TAG_BASE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
make bundle-push IMAGE_TAG_BASE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: 🏗️ Build and push Operator catalog
- name: 🏗️ Build and push Operator catalog image
run: |
make catalog-build IMAGE_TAG_BASE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
make catalog-push IMAGE_TAG_BASE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ COPY controllers/ controllers/
COPY internal/ internal/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -o manager ./cmd/
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -o manager ./cmd/


### Final stage
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
SHELL := /bin/bash

NAME := redkey-operator
VERSION := 0.1.0
VERSION := 0.0.1
ROBIN_VERSION := 0.1.0
GOLANG_VERSION := 1.25.7
DELVE_VERSION := 1.25
Expand Down Expand Up @@ -531,6 +531,14 @@ catalog-build: opm ## Build a catalog image.
catalog-push: ## Push a catalog image.
$(MAKE) docker-push IMG=$(CATALOG_IMG)

docker-build-and-push-multiarch: test ## Build and push operator docker image for multiple architectures (uses `${IMG}` image name).
$(info $(M) building and pushing operator docker image for multiple architectures)
$(CONTAINER_TOOL) buildx build --platform linux/amd64,linux/arm64 -t ${IMG} --build-arg GOLANG_VERSION=$(GOLANG_VERSION) . --load

bundle-build-and-push-multiarch: ## Build and push bundle docker image for multiple architectures (uses `${BUNDLE_IMG}` image name).
$(info $(M) building and pushing bundle docker image for multiple architectures)
$(CONTAINER_TOOL) buildx build --platform linux/amd64,linux/arm64 -t ${BUNDLE_IMG} . --load

##@ Test

TEST_PATHS := ./controllers/ ./internal/*/ ./api/*/
Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (

const (
USER_AGENT_NAME = "redkey-cluster-operator"
USER_AGENT_VERSION = "0.1.0"
USER_AGENT_VERSION = "0.0.1"
)

var (
Expand Down
Loading