Skip to content

Commit 2eb9464

Browse files
committed
Run preflight checks on images pushed to ghcr.io and only run checks during merges to main and prod releases
1 parent b7482df commit 2eb9464

File tree

3 files changed

+3
-22
lines changed

3 files changed

+3
-22
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,6 @@ jobs:
115115
password: ${{ steps.auth.outputs.access_token }}
116116
if: ${{ github.event_name != 'pull_request' && contains(inputs.image, 'plus') }}
117117

118-
- name: Login to Quay.io
119-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
120-
with:
121-
registry: quay.io
122-
username: ${{ secrets.QUAY_USERNAME }}
123-
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
124-
if: ${{ ! inputs.dry_run }}
125-
126118
- name: Docker meta
127119
id: meta
128120
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
@@ -135,9 +127,6 @@ jobs:
135127
name=us-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/nginx-gateway-fabric/nginx-plus,enable=${{ inputs.image == 'plus' && github.event_name != 'pull_request' }}
136128
name=ghcr.io/${{ github.repository_owner }}/nginx-gateway-fabric/operator,enable=${{ inputs.image == 'operator' && github.event_name != 'pull_request' }}
137129
name=localhost:5000/nginx-gateway-fabric/${{ inputs.image }}
138-
name=quay.io/${{ github.repository_owner }}/nginx-gateway-fabric,enable=${{ inputs.image == 'ngf' && inputs.build-os == 'ubi'}}
139-
name=quay.io/${{ github.repository_owner }}/nginx-gateway-fabric/nginx,enable=${{ inputs.image == 'nginx' && inputs.build-os == 'ubi' }}
140-
name=quay.io/${{ github.repository_owner }}/nginx-gateway-fabric/operator,enable=${{ inputs.image == 'operator' && inputs.build-os == 'ubi'}}
141130
flavor: |
142131
latest=${{ (inputs.tag != '' && 'true') || 'auto' }}
143132
tags: |

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ jobs:
422422
fail-fast: false
423423
matrix:
424424
image: [ngf, nginx, operator]
425-
# if: ${{ github.event_name == 'pull_request' && github.event_pull_request.base.ref == 'main' || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (inputs.is_production_release == true) }}
425+
if: ${{ github.event_name != 'pull_request' && github.event_pull_request.base.ref == 'main' || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (inputs.is_production_release == true) }}
426426
uses: ./.github/workflows/openshift-certification.yml
427427
with:
428428
image: ${{ matrix.image }}

.github/workflows/openshift-certification.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ jobs:
3434
with:
3535
ref: ${{ (inputs.tag != '' && !inputs.dry_run ) && format('refs/tags/v{0}', inputs.tag) || github.ref }}
3636

37-
- name: Login to Quay.io
38-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
39-
with:
40-
registry: quay.io
41-
username: ${{ secrets.QUAY_USERNAME }}
42-
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
43-
if: ${{ ! inputs.dry_run }}
44-
4537
- name: Download preflight binary
4638
run: |
4739
curl -LO https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/latest/download/preflight-linux-amd64
@@ -53,9 +45,9 @@ jobs:
5345
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
5446
run: |
5547
if [[ "${{ inputs.image }}" == "ngf" ]]; then
56-
IMAGE_PATH="quay.io/${{ github.repository_owner }}/nginx-gateway-fabric:${{ inputs.image_version }}"
48+
IMAGE_PATH="ghcr.io/${{ github.repository_owner }}/nginx-gateway-fabric:${{ inputs.image_version }}"
5749
else
58-
IMAGE_PATH="quay.io/${{ github.repository_owner }}/nginx-gateway-fabric/${{ inputs.image }}:${{ inputs.image_version }}"
50+
IMAGE_PATH="ghcr.io/${{ github.repository_owner }}/nginx-gateway-fabric/${{ inputs.image }}:${{ inputs.image_version }}"
5951
fi
6052
preflight check container "$IMAGE_PATH" > preflight-result.json
6153

0 commit comments

Comments
 (0)