Skip to content

Nightly Pipeline

Nightly Pipeline #333

Workflow file for this run

name: Nightly Pipeline
on:
schedule:
# Every night at 04:00 (UTC)
- cron: '0 4 * * *'
workflow_dispatch:
inputs:
release_branch:
description: Branch to release
required: true
default: main
type: string
plugin_quay_repository:
description: Plugin Quay repository
type: string
default: quay.io/kiali/ossmconsole
required: true
operator_quay_repository:
description: Operator Quay repository
type: string
default: quay.io/kiali/ossmconsole-operator
required: true
jobs:
initialize:
name: Initialize
runs-on: ubuntu-20.04
outputs:
plugin_quay_tag: ${{ steps.quay_tag.outputs.plugin_quay_tag }}
operator_quay_tag: ${{ steps.quay_tag.outputs.operator_quay_tag }}
steps:
- name: Determine Quay tag
id: quay_tag
run: |
if [ -z ${{ github.event.inputs.plugin_quay_repository }} ];
then
PLUGIN_QUAY_REPO="quay.io/kiali/ossmconsole"
else
PLUGIN_QUAY_REPO="${{ github.event.inputs.plugin_quay_repository }}"
fi
if [ -z ${{ github.event.inputs.operator_quay_repository }} ];
then
OPERATOR_QUAY_REPO="quay.io/kiali/ossmconsole-operator"
else
OPERATOR_QUAY_REPO="${{ github.event.inputs.operator_quay_repository }}"
fi
PLUGIN_QUAY_TAG="$PLUGIN_QUAY_REPO:latest"
OPERATOR_QUAY_TAG="$OPERATOR_QUAY_REPO:latest"
echo "::set-output name=plugin_quay_tag::$PLUGIN_QUAY_TAG"
echo "::set-output name=operator_quay_tag::$OPERATOR_QUAY_TAG"
- name: Log information
run: |
echo "Release type: latest"
echo "Plugin Quay tag": ${{ steps.quay_tag.outputs.plugin_quay_tag }}
echo "Operator Quay tag": ${{ steps.quay_tag.outputs.operator_quay_tag }}
push:
name: Push latest
runs-on: ubuntu-20.04
if: ${{ (github.event_name == 'schedule' && github.repository == 'kiali/openshift-servicemesh-plugin') || github.event_name != 'schedule' }}
needs: [initialize]
env:
PLUGIN_QUAY_TAG: ${{ needs.initialize.outputs.plugin_quay_tag }}
OPERATOR_QUAY_TAG: ${{ needs.initialize.outputs.operator_quay_tag }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.release_branch || github.ref_name }}
- name: Build and push plugin image
run: |
docker login -u ${{ secrets.QUAY_USER }} -p ${{ secrets.QUAY_PASSWORD }} quay.io
make build-push-plugin-multi-arch
- name: Build and push operator image
run: |
docker login -u ${{ secrets.QUAY_USER }} -p ${{ secrets.QUAY_PASSWORD }} quay.io
make build-push-operator-multi-arch