Skip to content

test ocp 4.9 compatibility (#5) #8

test ocp 4.9 compatibility (#5)

test ocp 4.9 compatibility (#5) #8

Workflow file for this run

name: Multiple Architecture Image Build
on:
workflow_dispatch:
push:
branches:
- "main"
- "release-*"
tags:
- "v*"
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
operator-build:
uses: trustification/release-tools/.github/workflows/build-push-images.yaml@main
with:
registry: "ghcr.io"
image_name: "${{ github.repository_owner }}/trustify-operator"
containerfile: "./Containerfile"
architectures: '[ "amd64" ]'
secrets:
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
bundle-build:
uses: trustification/release-tools/.github/workflows/build-push-images.yaml@main
needs:
- operator-build
with:
registry: "ghcr.io"
image_name: "${{ github.repository_owner }}/trustify-operator-bundle"
containerfile: "./bundle.Containerfile"
architectures: '[ "amd64" ]'
extra-args: "--build-arg IMAGE_GROUP=${{ github.repository_owner }}"
secrets:
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
catalog-build:
runs-on: ubuntu-latest
needs:
- bundle-build
steps:
- name: Setup OLM CLIs
run: |
export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac)
export OS=$(uname | awk '{print tolower($0)}')
# Opm
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-registry/releases/download/v1.26.5
curl -LO ${OPERATOR_SDK_DL_URL}/${OS}-${ARCH}-opm
chmod +x ${OS}-${ARCH}-opm && sudo mv ${OS}-${ARCH}-opm /usr/local/bin/opm
- name: Extract tag
id: extract_tag
run: |
tag=$(if [[ ${{github.ref_name}} == v* ]];then echo "${{github.ref_name}}"; else echo "latest"; fi)
echo "TAG=$tag" >> $GITHUB_ENV
- name: Create catalog
run: |
opm index add \
--bundles ghcr.io/${{ github.repository_owner }}/trustify-operator-bundle:${{ env.TAG }} \
--tag ${{ github.repository_owner }}/trustify-operator-catalog:${{ env.TAG }} \
--build-tool podman
- name: Push To Registry
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ github.repository_owner }}/trustify-operator-catalog
tags: ${{ env.TAG }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: "ghcr.io"