-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add create operator certification PR workflow
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: string | ||
description: The version of the operator to submit for approval | ||
required: true | ||
|
||
concurrency: | ||
group: ${{ github.ref_name }}-create-operator-pr | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
create-pr: | ||
name: Certify for Red Hat OpenShift | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Make | ||
run: | | ||
make bundle USE_IMAGE_DIGESTS=true | ||
- name: Checkout certified-operators repo | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
token: ${{ secrets.NGINX_PAT }} | ||
repository: nginx-bot/certified-operators | ||
path: certified-operators | ||
|
||
- name: Update certified-operators repo | ||
working-directory: certified-operators/operators/nginx-ingress-operator | ||
run: | | ||
mkdir v${{ inputs.version }} | ||
cp -R ../../../bundle/manifests v${{ inputs.version }}/ | ||
cp -R ../../../bundle/metadata v${{ inputs.version }}/ | ||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1 | ||
with: | ||
commit_message: operator nginx-ingress-operator (v${{ inputs.version }}) | ||
commit_author: nginx-bot <integrations@nginx.com> | ||
commit_user_name: nginx-bot | ||
commit_user_email: integrations@nginx.com | ||
create_branch: true | ||
branch: update-nginx-ingress-operator-to-v${{ inputs.version }} | ||
repository: certified-operators | ||
|
||
- name: Create PR | ||
working-directory: certified-operators | ||
run: | | ||
gh pr create --title "operator nginx-ingress-operator (v${{ inputs.version }})" --body "Update nginx-ingress-operator to v${{ inputs.version }}" --head nginx-bot:update-nginx-ingress-operator-to-v${{ inputs.version }} --base main --repo redhat-openshift-ecosystem/certified-operators | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NGINX_PAT }} |