This repository is currently being migrated. It's locked while the migration is in progress.
-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (78 loc) · 3 KB
/
generate-bundle.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
72
73
74
75
76
77
78
79
80
81
name: Generate Bundle
on:
workflow_dispatch:
# Enable manual trigger of this action.
inputs:
packageName:
description: OLM package name.
default: storageos2
required: true
bundleVersion:
description: Bundle version to create or update, e.g. `2.2.0`.
required: true
channels:
description: List of bundle release channels.
default: stable
required: true
defaultChannel:
description: Default bundle release channel.
default: stable
required: true
operatorRepo:
description: Operator git repo to extract metadata from.
default: https://github.com/storageos/operator
required: true
operatorBranch:
description: Operator git repo branch or tag to clone.
required: true
operatorManifestDir:
description: Path to the manifests directory in the operator repo.
default: bundle/manifests
required: true
jobs:
generate-bundle:
runs-on: ubuntu-latest
name: Generate operator bundle
steps:
- uses: actions/checkout@v2
- name: Set target bundle path
run: echo "OUTPUT_DIR=${{ github.event.inputs.packageName }}/${{ github.event.inputs.bundleVersion }}" >> $GITHUB_ENV
- name: Set image list path
run: echo "IMAGE_LIST=${{ github.event.inputs.packageName }}/imagelist-${{ github.event.inputs.bundleVersion }}.yaml" >> $GITHUB_ENV
- name: olm-bundle action
uses: darkowlzz/[email protected]
id: olm
with:
outputDir: ${{ env.OUTPUT_DIR }}
channels: ${{ github.event.inputs.channels }}
defaultChannel: ${{ github.event.inputs.defaultChannel }}
package: ${{ github.event.inputs.packageName }}
operatorRepo: ${{ github.event.inputs.operatorRepo }}
operatorBranch: ${{ github.event.inputs.operatorBranch }}
operatorManifestsDir: ${{ github.event.inputs.operatorManifestDir }}
dockerfileLabels: storageos2/common-labels.txt
- name: Update related images
uses: darkowlzz/[email protected]
with:
imageListFile: ${{ env.IMAGE_LIST }}
targetFile: ${{ env.OUTPUT_DIR }}/manifests/storageosoperator.clusterserviceversion.yaml
deploymentName: storageos-operator
containerName: storageos-operator
- name: Tree output
run: echo "${{ steps.olm.outputs.tree }}"
- name: Create Pull Request
uses: peter-evans/[email protected]
id: cpr
with:
commit-message: "Update bundle ${{ env.OUTPUT_DIR }}"
branch: generated-bundle
delete-branch: true
title: "Update bundle ${{ env.OUTPUT_DIR }}"
body: |
Generated bundle with related images from `${{ env.IMAGE_LIST }}`.
```
${{ steps.olm.outputs.tree }}
```
- name: Pull request info
run: |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"