-
Notifications
You must be signed in to change notification settings - Fork 137
Add workflow to validate UBI images pass RedHat Certification #4035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
2121f3b
d61c9f4
2ffc89c
34d29e7
11cb2ec
c132f47
7597193
9691208
bb8a349
f164607
8d908cf
afc676e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: OpenShift Certification | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
runner: | ||
required: false | ||
type: string | ||
default: 'ubuntu-24.04' | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
preflight: | ||
runs-on: ${{ inputs.runner }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download preflight binary | ||
run: | | ||
curl -LO https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/latest/download/preflight-linux-amd64 | ||
chmod +x preflight-linux-amd64 | ||
sudo mv preflight-linux-amd64 /usr/local/bin/preflight | ||
- name: Run preflight for NGINX Gateway Fabric | ||
env: | ||
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }} | ||
run: preflight check container ghcr.io/nginx/nginx-gateway-fabric:edge-ubi --json > ngf-preflight-result.json | ||
|
||
|
||
- name: Run preflight for NGINX OSS | ||
env: | ||
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }} | ||
run: preflight check container ghcr.io/nginx/nginx-gateway-fabric/nginx:edge-ubi --json > ngf-oss-preflight-result.json | ||
|
||
- name: Run preflight for NGINX Gateway Fabric Operator | ||
env: | ||
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }} | ||
run: preflight check operator ghcr.io/nginx/nginx-gateway-fabric/operator:edge --json > ngf-operator-preflight-result.json | ||
|
||
- name: Aggregate preflight results and fail if any checks failed | ||
run: | | ||
total_failed=0 | ||
for result in ngf-preflight-result.json ngf-oss-preflight-result.json ngf-operator-preflight-result.json; do | ||
failed_count=$(jq '.results.failed | length' "$result") | ||
total_failed=$((total_failed + failed_count)) | ||
done | ||
if [ "$total_failed" -ne 0 ]; then | ||
echo "Preflight checks failed: $total_failed failed checks across all images" | ||
for result in ngf-preflight-result.json ngf-oss-preflight-result.json ngf-operator-preflight-result.json; do | ||
echo "Results for $result:" | ||
jq '.results.failed' "$result" | ||
done | ||
exit 1 | ||
fi |
Uh oh!
There was an error while loading. Please reload this page.