Skip to content

Commit d8dab14

Browse files
committed
fix(bundle): Use midstream repo for publishing bundle to OperatorHub
Signed-off-by: Mat Kowalski <mko@redhat.com>
1 parent 6581f2b commit d8dab14

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.github/workflows/publish-operatorhub-on-release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ on:
99
description: 'Release tag to publish (e.g., v0.88.0)'
1010
required: true
1111
type: string
12+
community_operators_midstream_repo_org:
13+
description: 'Midstream repostiory for opening a PR'
14+
required: true
15+
type: choice
16+
default: 'openshift-networking'
17+
options:
18+
- openshift-networking
1219

1320
env:
1421
OPERATOR_NAME: kubernetes-nmstate-operator
@@ -107,7 +114,7 @@ jobs:
107114
git checkout -b "$BRANCH_NAME"
108115
git add operators/${{ env.OPERATOR_NAME }}/${{ steps.version.outputs.version }}
109116
git commit -m "operator ${{ env.OPERATOR_NAME }} (${{ steps.version.outputs.version }})"
110-
git push origin "$BRANCH_NAME"
117+
git push "https://github.com/${{ github.event.inputs.community_operators_midstream_repo_org }}/community-operators.git" "$BRANCH_NAME"
111118
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
112119
113120
- name: Create Pull Request to community-operators
@@ -238,7 +245,7 @@ jobs:
238245
git checkout -b "$BRANCH_NAME"
239246
git add operators/${{ env.OPERATOR_NAME }}/${{ steps.version.outputs.version }}
240247
git commit -m "operator ${{ env.OPERATOR_NAME }} (${{ steps.version.outputs.version }})"
241-
git push origin "$BRANCH_NAME"
248+
git push "https://github.com/${{ github.event.inputs.community_operators_midstream_repo_org }}/community-operators.git" "$BRANCH_NAME"
242249
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
243250
244251
- name: Create Pull Request to community-operators-prod

.github/workflows/publish-operatorhub.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ on:
1515
options:
1616
- community-operators
1717
- community-operators-prod
18+
community_operators_midstream_repo_org:
19+
description: 'Midstream repostiory for opening a PR'
20+
required: true
21+
type: choice
22+
default: 'openshift-networking'
23+
options:
24+
- openshift-networking
1825
create_pr:
1926
description: 'Create PR to OperatorHub (disable for testing)'
2027
required: true
@@ -125,7 +132,7 @@ jobs:
125132
if: ${{ github.event.inputs.create_pr == 'true' }}
126133
working-directory: operatorhub-repo
127134
run: |
128-
git push origin "${{ env.BRANCH_NAME }}"
135+
git push "https://github.com/${{ github.event.inputs.community_operators_midstream_repo_org }}/community-operators.git" "${{ env.BRANCH_NAME }}"
129136
130137
- name: Create Pull Request
131138
if: ${{ github.event.inputs.create_pr == 'true' }}

0 commit comments

Comments
 (0)