diff --git a/.github/workflows/march-image-build-push.yml b/.github/workflows/march-image-build-push.yml index 6f7d71d..1dd4d76 100644 --- a/.github/workflows/march-image-build-push.yml +++ b/.github/workflows/march-image-build-push.yml @@ -49,14 +49,22 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - - name: Build index + - name: Generate Operator Index Dockerfile run: | CONTAINER_RUNTIME=podman \ CATALOG_IMG=quay.io/konveyor/tackle2-operator-index:latest \ BUNDLE_IMG=quay.io/konveyor/tackle2-operator-bundle:latest \ - make catalog-build + make catalog-index if: ${{ github.ref == 'refs/heads/main' }} - - name: Push index - run: podman push quay.io/konveyor/tackle2-operator-index:latest --creds=${{ secrets.QUAY_PUBLISH_ROBOT }}:${{ secrets.QUAY_PUBLISH_TOKEN }} - if: ${{ github.ref == 'refs/heads/main' }} + - name: Build Operator Index + uses: konveyor/release-tools/build-push-quay@main + with: + architectures: "amd64 arm64" + containerfile: "./index.Dockerfile" + image_name: "tackle2-operator-index" + image_namespace: "konveyor" + image_registry: "quay.io" + quay_publish_robot: ${{ secrets.QUAY_PUBLISH_ROBOT }} + quay_publish_token: ${{ secrets.QUAY_PUBLISH_TOKEN }} + ref: ${{ github.ref }} diff --git a/Makefile b/Makefile index 733eec9..e8614ef 100644 --- a/Makefile +++ b/Makefile @@ -251,6 +251,11 @@ endif catalog-build: opm ## Build a catalog image. $(OPM) index add --container-tool $(CONTAINER_RUNTIME) --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) +# Only generate an index Dockerfile so we can create a multi-arch index +.PHONY: catalog-index +catalog-index: opm ## Generate a catalog image dockerfile. + $(OPM) index add --container-tool $(CONTAINER_RUNTIME) --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) --generate + # Push the catalog image. .PHONY: catalog-push catalog-push: ## Push a catalog image.