|
24 | 24 | build: |
25 | 25 | name: Build Image |
26 | 26 | runs-on: ubuntu-22.04 |
| 27 | + outputs: |
| 28 | + version: ${{ steps.vars.outputs.version }} |
27 | 29 | permissions: |
28 | 30 | contents: write # for lucacome/draft-release to create a draft release |
29 | 31 | security-events: write # for github/codeql-action/upload-sarif to upload SARIF results |
@@ -148,16 +150,57 @@ jobs: |
148 | 150 | - OpenShift {{openshift_version}} or newer. |
149 | 151 | if: github.event_name != 'pull_request' |
150 | 152 |
|
| 153 | + certify: |
| 154 | + name: Certify for Red Hat OpenShift |
| 155 | + runs-on: ubuntu-22.04 |
| 156 | + needs: build |
| 157 | + if: ${{ github.ref_type == 'tag' }} |
| 158 | + steps: |
151 | 159 | - name: Certify Images |
152 | 160 | continue-on-error: true |
153 | 161 | run: | |
154 | | - curl -fsSL https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/1.6.9/preflight-linux-amd64 --output preflight |
| 162 | + curl -fsSL https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/1.7.0/preflight-linux-amd64 --output preflight |
155 | 163 | chmod +x preflight |
156 | 164 |
|
157 | 165 | IFS=',' read -ra arch_list <<< "${{ env.platforms }}" |
158 | 166 |
|
159 | 167 | for arch in "${arch_list[@]}"; do |
160 | 168 | architecture=("${arch#*/}") |
161 | | - ./preflight check container quay.io/nginx/nginx-ingress-operator:${{ steps.meta.outputs.version }} --pyxis-api-token ${{ secrets.PYXIS_API_TOKEN }} --certification-project-id ${{ secrets.CERTIFICATION_PROJECT_ID }} --platform $architecture --submit |
| 169 | + ./preflight check container quay.io/nginx/nginx-ingress-operator:${{ needs.build.outputs.version }} --pyxis-api-token ${{ secrets.PYXIS_API_TOKEN }} --certification-project-id ${{ secrets.CERTIFICATION_PROJECT_ID }} --platform $architecture --submit |
162 | 170 | done |
163 | | - if: ${{ github.ref_type == 'tag' }} |
| 171 | +
|
| 172 | + - name: Make |
| 173 | + run: | |
| 174 | + make bundle USE_IMAGE_DIGESTS=true |
| 175 | +
|
| 176 | + - name: Checkout certified-operators repo |
| 177 | + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 |
| 178 | + with: |
| 179 | + token: ${{ secrets.NGINX_PAT }} |
| 180 | + repository: nginx-bot/certified-operators |
| 181 | + path: certified-operators |
| 182 | + |
| 183 | + - name: Update certified-operators repo |
| 184 | + working-directory: certified-operators/operators/nginx-ingress-operator |
| 185 | + run: | |
| 186 | + mkdir v${{ needs.build.outputs.version }} |
| 187 | + cp -R ../../../bundle/manifests v${{ needs.build.outputs.version }}/ |
| 188 | + cp -R ../../../bundle/metadata v${{ needs.build.outputs.version }}/ |
| 189 | +
|
| 190 | + - name: Commit changes |
| 191 | + uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0 |
| 192 | + with: |
| 193 | + commit_message: operator nginx-ingress-operator (v${{ needs.build.outputs.version }}) |
| 194 | + commit_author: nginx-bot <[email protected]> |
| 195 | + commit_user_name: nginx-bot |
| 196 | + commit_user_email: [email protected] |
| 197 | + create_branch: true |
| 198 | + branch: update-nginx-ingress-operator-to-v${{ needs.build.outputs.version }} |
| 199 | + repository: certified-operators |
| 200 | + |
| 201 | + - name: Create PR |
| 202 | + working-directory: certified-operators |
| 203 | + run: | |
| 204 | + gh pr create --title "operator nginx-ingress-operator (v${{ needs.build.outputs.version }})" --body "Update nginx-ingress-operator to v${{ needs.build.outputs.version }}" --head nginx-bot:update-nginx-ingress-operator-to-v${{ needs.build.outputs.version }} --base main --repo redhat-openshift-ecosystem/certified-operators |
| 205 | + env: |
| 206 | + GITHUB_TOKEN: ${{ secrets.NGINX_PAT }} |
0 commit comments