diff --git a/.github/workflows/olm.yaml b/.github/workflows/olm.yaml new file mode 100644 index 000000000..b393b96b1 --- /dev/null +++ b/.github/workflows/olm.yaml @@ -0,0 +1,30 @@ +name: "Publish to operatorHUB" +on: + workflow_dispatch: + inputs: + version: + description: version of the operator to publish + required: true + +jobs: + operator-hub-prod-release: + uses: ./.github/workflows/reusable-operator-hub-release.yaml + with: + org: redhat-openshift-ecosystem + repo: community-operators-prod + branch: releases/${{inputs.version}} + oprepo: ${{ github.repository }} + bundletype: openshift + secrets: + TEMPOOPERATORBOT_GITHUB_TOKEN: ${{ secrets.TEMPOOPERATORBOT_GITHUB_TOKEN }} + + operator-hub-community-release: + uses: ./.github/workflows/reusable-operator-hub-release.yaml + with: + org: k8s-operatorhub + repo: community-operators + branch: releases/${{inputs.version}} + oprepo: ${{ github.repository }} + bundletype: community + secrets: + TEMPOOPERATORBOT_GITHUB_TOKEN: ${{ secrets.TEMPOOPERATORBOT_GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 46f42c222..6b888e753 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -53,6 +53,7 @@ jobs: repo: community-operators-prod branch: ${{ github.event.pull_request.head.ref }} oprepo: ${{ github.repository }} + bundletype: openshift secrets: TEMPOOPERATORBOT_GITHUB_TOKEN: ${{ secrets.TEMPOOPERATORBOT_GITHUB_TOKEN }} @@ -64,5 +65,6 @@ jobs: repo: community-operators branch: ${{ github.event.pull_request.head.ref }} oprepo: ${{ github.repository }} + bundletype: community secrets: TEMPOOPERATORBOT_GITHUB_TOKEN: ${{ secrets.TEMPOOPERATORBOT_GITHUB_TOKEN }} diff --git a/.github/workflows/reusable-operator-hub-release.yaml b/.github/workflows/reusable-operator-hub-release.yaml index fdefae762..620bb4dd8 100644 --- a/.github/workflows/reusable-operator-hub-release.yaml +++ b/.github/workflows/reusable-operator-hub-release.yaml @@ -15,6 +15,9 @@ on: oprepo: type: string required: true + bundletype: + type: string + required: true secrets: TEMPOOPERATORBOT_GITHUB_TOKEN: required: true @@ -56,15 +59,16 @@ jobs: - name: Update version env: VERSION: ${{ steps.operator-version.outputs.version }} + BUNDLE_TYPE: ${{ inputs.bundletype }} run: | mkdir operators/tempo-operator/${VERSION} - cp -R ./tmp/bundle/* operators/tempo-operator/${VERSION} + cp -R ./tmp/bundle/${BUNDLE_TYPE}/* operators/tempo-operator/${VERSION} rm -rf ./tmp - name: Use CLA approved github bot run: | git config user.name tempobot - git config user.email 107717825+grafana@users.noreply.github.com + git config user.email 150731540+grafana@users.noreply.github.com - name: Create pull request against ${{ inputs.org }}/${{ inputs.repo }} env: