|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + version: |
| 7 | + type: string |
| 8 | + description: The version of the operator to submit for approval |
| 9 | + required: true |
| 10 | + |
| 11 | +concurrency: |
| 12 | + group: ${{ github.ref_name }}-create-operator-pr |
| 13 | + cancel-in-progress: true |
| 14 | + |
| 15 | +permissions: |
| 16 | + contents: read |
| 17 | + |
| 18 | +jobs: |
| 19 | + create-pr: |
| 20 | + name: Certify for Red Hat OpenShift |
| 21 | + runs-on: ubuntu-22.04 |
| 22 | + steps: |
| 23 | + - name: Checkout Repository |
| 24 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 25 | + |
| 26 | + - name: Make |
| 27 | + run: | |
| 28 | + make bundle USE_IMAGE_DIGESTS=true |
| 29 | +
|
| 30 | + - name: Checkout certified-operators repo |
| 31 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 32 | + with: |
| 33 | + token: ${{ secrets.NGINX_PAT }} |
| 34 | + repository: nginx-bot/certified-operators |
| 35 | + path: certified-operators |
| 36 | + |
| 37 | + - name: Update certified-operators repo |
| 38 | + working-directory: certified-operators/operators/nginx-ingress-operator |
| 39 | + run: | |
| 40 | + mkdir v${{ inputs.version }} |
| 41 | + cp -R ../../../bundle/manifests v${{ inputs.version }}/ |
| 42 | + cp -R ../../../bundle/metadata v${{ inputs.version }}/ |
| 43 | +
|
| 44 | + - name: Commit changes |
| 45 | + uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1 |
| 46 | + with: |
| 47 | + commit_message: operator nginx-ingress-operator (v${{ inputs.version }}) |
| 48 | + commit_author: nginx-bot <integrations@nginx.com> |
| 49 | + commit_user_name: nginx-bot |
| 50 | + commit_user_email: integrations@nginx.com |
| 51 | + create_branch: true |
| 52 | + branch: update-nginx-ingress-operator-to-v${{ inputs.version }} |
| 53 | + repository: certified-operators |
| 54 | + |
| 55 | + - name: Create PR |
| 56 | + working-directory: certified-operators |
| 57 | + run: | |
| 58 | + 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 |
| 59 | + env: |
| 60 | + GITHUB_TOKEN: ${{ secrets.NGINX_PAT }} |
0 commit comments