-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from varad-ahirwadkar/main
Add GitHub workflow to build operator images
- Loading branch information
Showing
2 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters