86 lines
2.8 KiB
YAML
86 lines
2.8 KiB
YAML
#
|
|
# Copyright (c) 2019-2023 Red Hat, Inc.
|
|
# This program and the accompanying materials are made
|
|
# available under the terms of the Eclipse Public License 2.0
|
|
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
#
|
|
# SPDX-License-Identifier: EPL-2.0
|
|
#
|
|
# Contributors:
|
|
# Red Hat, Inc. - initial API and implementation
|
|
#
|
|
|
|
name: Release next catalog
|
|
on:
|
|
# manual trigger if required
|
|
workflow_dispatch:
|
|
inputs:
|
|
reason:
|
|
description: 'Reason to trigger a build'
|
|
required: false
|
|
push:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
build-operator-image:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout source code
|
|
uses: actions/checkout@v3
|
|
- name: Install yq
|
|
run: sudo pip install yq
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Login to quay.io
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.QUAY_USERNAME }}
|
|
password: ${{ secrets.QUAY_PASSWORD }}
|
|
registry: quay.io
|
|
- name: Build operator image
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
file: Dockerfile
|
|
platforms: linux/amd64,linux/ppc64le
|
|
push: true
|
|
tags: quay.io/eclipse/che-operator:next
|
|
build-catalog:
|
|
runs-on: ubuntu-22.04
|
|
needs: build-operator-image
|
|
steps:
|
|
- name: Checkout source code
|
|
uses: actions/checkout@v3
|
|
- name: Install yq
|
|
run: sudo pip install yq
|
|
- name: Login to quay.io
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.QUAY_USERNAME }}
|
|
password: ${{ secrets.QUAY_PASSWORD }}
|
|
registry: quay.io
|
|
- name: Build catalog source
|
|
run: ${GITHUB_WORKSPACE}/build/scripts/olm/release-catalog.sh --channel 'next' --catalog-image quay.io/eclipse/eclipse-che-olm-catalog:next
|
|
build-catalog-with-digest:
|
|
runs-on: ubuntu-22.04
|
|
needs: build-operator-image
|
|
steps:
|
|
- name: Checkout source code
|
|
uses: actions/checkout@v3
|
|
- name: Install yq
|
|
run: sudo pip install yq
|
|
- name: Login to quay.io
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.QUAY_USERNAME }}
|
|
password: ${{ secrets.QUAY_PASSWORD }}
|
|
registry: quay.io
|
|
- name: Build catalog source
|
|
run: |
|
|
${GITHUB_WORKSPACE}/build/scripts/release/addDigests.sh -s $(make csv-path CHANNEL=next) -t next
|
|
${GITHUB_WORKSPACE}/build/scripts/olm/release-catalog.sh \
|
|
--channel next \
|
|
--catalog-image quay.io/eclipse/eclipse-che-olm-catalog:next-digest \
|
|
--bundle-image quay.io/eclipse/eclipse-che-olm-bundle:$(make bundle-version CHANNEL=next)-digest
|