Skip to content

Commit

Permalink
Merge pull request #17 from varad-ahirwadkar/main
Browse files Browse the repository at this point in the history
Add GitHub workflow to build operator images
  • Loading branch information
Power Cloud Robot authored Jul 2, 2024
2 parents 37b57a9 + f47a407 commit f9e7772
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/build-operator-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build and Publish RSCT Operator

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

env:
GO_VERSION: "1.22"
IMAGE_TAG_BASE: ghcr.io/${{ github.repository }}
IMAGE_BUILDER: "docker"

jobs:
build-and-publish-operator:
name: Build and Publish RSCT Operator Images
runs-on: ubuntu-latest
steps:
- name: Set the release version
run: echo "VERSION=$(echo ${GITHUB_REF/refs\/tags\//})" >> $GITHUB_ENV

- name: Checkout
uses: actions/checkout@v4

- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true

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

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

- name: Login to ghcr.io
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build operator container images and push
id: docker_build
uses: docker/build-push-action@v5
with:
file: Dockerfile
tags: ${{ env.IMAGE_TAG_BASE }}:${{ env.VERSION }}, ${{ env.IMAGE_TAG_BASE }}:latest
push: true
platforms: 'linux/ppc64le'
provenance: false

- name: Build operator bundle and push
id: operator_bundle
run: |
make bundle bundle-build bundle-push
- name: Building a catalog containing a bundled Operator
id: catalog_build
run: |
make catalog-build catalog-push
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.22.4 AS builder
FROM golang:1.22 AS builder
ARG TARGETOS
ARG TARGETARCH

Expand Down

0 comments on commit f9e7772

Please sign in to comment.