Skip to content

Commit 2597aac

Browse files
authored
Merge pull request #236 from sunya-ch/ci-patch-1
2 parents 7c44019 + 9fa6fd0 commit 2597aac

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/build_catalog.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow will be run manually on demand
2+
# to generate catalog image with specific set of bundles with specific tag for testing purpose.
3+
# To trigger this workflow,
4+
# please check https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow.
5+
name: Build Developing Operator Catalog
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
bundle_images:
11+
description: 'comma-separated list of bundle images'
12+
required: true
13+
tag:
14+
description: 'image tag'
15+
required: true
16+
17+
env:
18+
CATALOG_IMAGE: ghcr.io/${{ github.repository }}-catalog:${{ github.event.inputs.tag }}
19+
20+
jobs:
21+
build-catalog:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout the repository
26+
uses: actions/checkout@v3
27+
28+
- name: Set up Go
29+
uses: actions/setup-go@v3
30+
with:
31+
go-version: '1.22'
32+
33+
- name: Install dependencies
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y \
37+
opm \
38+
docker.io
39+
40+
- name: Build Operator Catalog
41+
run: |
42+
mkdir -p /tmp/catalog
43+
opm index add --bundles ${{ github.event.inputs.bundle_images }} --tag ${{ env.CATALOG_IMAGE }}
44+
45+
- name: Push Catalog to Docker Registry
46+
run: |
47+
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
48+
docker build -t ${{ env.CATALOG_IMAGE }} /tmp/catalog
49+
docker push ${{ env.CATALOG_IMAGE }}

0 commit comments

Comments
 (0)