-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy pathcatalog-openstack-operator-upgrades.yaml
More file actions
85 lines (85 loc) · 3.18 KB
/
Copy pathcatalog-openstack-operator-upgrades.yaml
File metadata and controls
85 lines (85 loc) · 3.18 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Build catalog for OLM upgrade testing
on:
workflow_dispatch:
branches:
- '*'
workflow_run:
workflows: ["openstack operator image builder"]
types:
- completed
branches:
- '*'
secrets:
IMAGENAMESPACE:
required: true
QUAY_USERNAME:
required: true
QUAY_PASSWORD:
required: true
REDHATIO_USERNAME:
required: true
REDHATIO_PASSWORD:
required: true
env:
imageregistry: 'quay.io'
imagenamespace: ${{ secrets.IMAGENAMESPACE || secrets.QUAY_USERNAME }}
latesttag: latest
jobs:
build-catalog:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version: ${{ inputs.go_version }}
cache: false
- name: Checkout openstack-operator repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: ./openstack-operator
- name: Set latest tag for non main branch
if: "${{ github.ref_name != 'main' }}"
run: |
echo "latesttag=${{ github.ref_name }}-latest" >> $GITHUB_ENV
- name: Install opm
uses: redhat-actions/openshift-tools-installer@ebd96c3fc72fc10a62663eac5e1421192152e6aa # v2
with:
source: github
opm: 'latest'
- name: Log in to Quay Registry
uses: redhat-actions/podman-login@50c2d9a331bb67c8fdab99b86455fad05e2e3252 # v2
with:
registry: ${{ env.imageregistry }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Log in to Red Hat Registry
uses: redhat-actions/podman-login@50c2d9a331bb67c8fdab99b86455fad05e2e3252 # v2
with:
registry: registry.redhat.io
username: ${{ secrets.REDHATIO_USERNAME }}
password: ${{ secrets.REDHATIO_PASSWORD }}
- name: Create the catalog index
shell: bash
run: ./openstack-operator/hack/catalog-build-olm-upgrade.sh
env:
#FIXME: these should be pulled from a YAML config in the main operator directory?
MAIN_VERSION: 19.0.0
FEATURE_RELEASE_VERSION: 0.7.0
FEATURE_RELEASE_BRANCH: 18-stable
BUNDLE: ${{ env.imageregistry }}/${{ env.imagenamespace }}/openstack-operator-bundle:${{ github.sha }}
- name: Buildah Action
id: build-operator-index-upgrade
uses: redhat-actions/buildah-build@3a51aade9afa17e5c78256bcbe2e1ee08c7b995b # v3
with:
image: openstack-operator-index-upgrade
tags: ${{ env.latesttag }} ${{ github.sha }}
containerfiles: |
./catalog.Dockerfile
- name: Push openstack-operator-index-upgrade To ${{ env.imageregistry }}
uses: redhat-actions/push-to-registry@94ade333c38ecc0e60e94785125d9a52ca423b37 # v3
with:
image: ${{ steps.build-operator-index-upgrade.outputs.image }}
tags: ${{ steps.build-operator-index-upgrade.outputs.tags }}
registry: ${{ env.imageregistry }}/${{ env.imagenamespace }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}