Skip to content

Commit

Permalink
add create operator certification PR workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 committed Dec 17, 2024
1 parent b80c84e commit 5819554
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/create-operator-pr.yml
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 }}

0 comments on commit 5819554

Please sign in to comment.