Prepare for WTO 1.11 release #145
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
# | |
# Copyright (c) 2020-2024 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 | |
# | |
name: Next Dockerimages | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build-next-imgs: | |
runs-on: ubuntu-latest | |
env: | |
BUNDLE_IMG: quay.io/wto/web-terminal-operator-metadata:next | |
INDEX_IMG: quay.io/wto/web-terminal-operator-index:next | |
WTO_IMG: quay.io/wto/web-terminal-operator:next | |
OPM_VERSION: v1.13.1 | |
OPERATOR_SDK_VERSION: v0.17.2 | |
steps: | |
- name: Cache Operator SDK ${{ env.OPERATOR_SDK_VERSION }} | |
uses: actions/cache@v2 | |
id: cache-operator-sdk | |
with: | |
path: ~/cache | |
key: operator-sdk-${{ env.OPERATOR_SDK_VERSION }} | |
- name: Download Operator SDK ${{ env.OPERATOR_SDK_VERSION }} | |
if: steps.cache-operator-sdk.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p ~/cache | |
wget https://github.com/operator-framework/operator-sdk/releases/download/v0.17.2/operator-sdk-${OPERATOR_SDK_VERSION}-x86_64-linux-gnu -O ~/cache/operator-sdk-${OPERATOR_SDK_VERSION} > /dev/null | |
chmod +x ~/cache/operator-sdk-${OPERATOR_SDK_VERSION} | |
- name: Install Operator SDK ${{ env.OPERATOR_SDK_VERSION }} | |
run: | | |
mkdir -p ~/bin | |
cp ~/cache/operator-sdk-${OPERATOR_SDK_VERSION} ~/bin/operator-sdk | |
echo "$HOME/bin" >> $GITHUB_PATH | |
- name: Cache OPM ${{ env.OPM_VERSION }} | |
uses: actions/cache@v2 | |
id: cache-opm | |
with: | |
path: ~/cache | |
key: opm-${{ env.OPM_VERSION }} | |
- name: Download OPM ${{ env.OPM_VERSION }} | |
if: steps.cache-opm.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p ~/cache | |
wget https://github.com/operator-framework/operator-registry/releases/download/${OPM_VERSION}/linux-amd64-opm -O ~/cache/opm${OPM_VERSION} > /dev/null | |
#${OPM_VERSION} is used in binary name to prevent caching after upgrading | |
chmod +x ~/cache/opm${OPM_VERSION} | |
- name: Install OPM ${{ env.OPM_VERSION }} | |
run: | | |
mkdir -p ~/bin | |
cp ~/cache/opm${OPM_VERSION} ~/bin/opm | |
echo "$HOME/bin" >> $GITHUB_PATH | |
- name: Checkout web-terminal-operator source code | |
uses: actions/checkout@v2 | |
- name: Login to quay.io | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
registry: quay.io | |
- name: "Build Controller image and push to quay.io" | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./build/dockerfiles/controller.Dockerfile | |
push: true | |
tags: quay.io/wto/web-terminal-operator:next | |
- name: "Build Bundle & Index images" | |
run: | | |
pip install yq | |
./build/scripts/build_index_image.sh \ | |
--bundle-image ${BUNDLE_IMG} \ | |
--index-image ${INDEX_IMG} \ | |
--container-tool docker \ | |
--force | |
- name: "Docker Logout" | |
run: docker logout |