Skip to content

Commit

Permalink
✨ build multi-arch index image
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
  • Loading branch information
jmontleon committed Jun 4, 2024
1 parent 03c514d commit 5a03591
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/march-image-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5a03591

Please sign in to comment.