-
Notifications
You must be signed in to change notification settings - Fork 117
71 lines (61 loc) · 1.95 KB
/
nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Nightly
on:
schedule:
# Every night at 04:00 (UTC)
- cron: '0 4 * * *'
workflow_dispatch:
inputs:
release_branch:
description: Branch to release
required: true
default: master
type: string
quay_repository:
description: Quay repository
type: string
default: quay.io/kiali/kiali-operator
required: true
jobs:
initialize:
name: Initialize
runs-on: ubuntu-20.04
outputs:
target_branch: ${{ github.ref_name }}
quay_tag: ${{ steps.quay_tag.outputs.quay_tag }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.release_branch || github.ref_name }}
- name: Determine Quay tag
id: quay_tag
run: |
if [ -z ${{ github.event.inputs.quay_repository }} ];
then
QUAY_REPO="quay.io/kiali/kiali-operator"
else
QUAY_REPO="${{ github.event.inputs.quay_repository }}"
fi
QUAY_TAG="$QUAY_REPO:latest"
echo "quay_tag=$QUAY_TAG" >> $GITHUB_OUTPUT
- name: Log information
run: |
echo "Release type: latest"
echo "Quay tag": ${{ steps.quay_tag.outputs.quay_tag }}
push:
name: Push latest
# Avoid schedule workflows from forks to push images
if: ${{ (github.event_name == 'schedule' && github.repository == 'kiali/kiali-operator') || github.event_name != 'schedule' }}
runs-on: ubuntu-20.04
needs: [initialize]
env:
OPERATOR_QUAY_TAG: ${{ needs.initialize.outputs.quay_tag }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.release_branch }}
- name: Build and push image
run: |
docker login -u ${{ secrets.QUAY_USER }} -p ${{ secrets.QUAY_PASSWORD }} quay.io
make -e DOCKER_CLI_EXPERIMENTAL=enabled container-multi-arch-push-kiali-operator-quay