Skip to content
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

Skip CI run on docs changes #2931

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
min_k8s_version: ${{ steps.vars.outputs.min_k8s_version }}
k8s_latest: ${{ steps.vars.outputs.k8s_latest }}
helm_changes: ${{ steps.filter.outputs.charts }}
docs_only_changes: ${{ steps.filter.outputs.docs && !steps.filter.outputs.code }}
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -55,6 +56,14 @@ jobs:
filters: |
charts:
- charts/nginx-gateway-fabric/**/*
docs: &docs
- design/**
- docs/**
- examples/**
- site/**
code:
- '**'
- '!*docs'

- name: Output Variables
id: vars
Expand All @@ -78,6 +87,7 @@ jobs:
name: Unit Tests
runs-on: ubuntu-24.04
needs: vars
if: ${{ needs.vars.outputs.docs_only_changes == 'true' }}
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -109,6 +119,7 @@ jobs:
name: NJS Unit Tests
runs-on: ubuntu-24.04
needs: vars
if: ${{ needs.vars.outputs.docs_only_changes == 'true' }}
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -245,6 +256,7 @@ jobs:
conformance-tests:
name: Conformance tests
needs: [vars, build-oss, build-plus]
if: ${{ ! failure() }}
strategy:
fail-fast: false
matrix:
Expand All @@ -260,13 +272,15 @@ jobs:
image: ${{ matrix.image }}
k8s-version: ${{ matrix.k8s-version }}
enable-experimental: ${{ matrix.enable-experimental }}
if: ${{ (!github.event.pull_request.head.repo.fork || matrix.image != 'plus' ) && needs.vars.outputs.docs_only_changes != 'true' }}
secrets: inherit
permissions:
contents: write

helm-tests:
name: Helm Tests
needs: [vars, build-oss, build-plus]
if: ${{ needs.vars.outputs.helm_changes == 'true' || github.event_name == 'schedule' }}
strategy:
fail-fast: false
matrix:
Expand All @@ -281,7 +295,6 @@ jobs:
image: ${{ matrix.image }}
k8s-version: ${{ matrix.k8s-version }}
secrets: inherit
if: ${{ needs.vars.outputs.helm_changes == 'true' || github.event_name == 'schedule' }}

publish-helm:
name: Package and Publish Helm Chart
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
enable-experimental:
required: true
type: boolean
if:
required: false
type: boolean
default: true

defaults:
run:
Expand All @@ -28,7 +32,7 @@ jobs:
conformance-tests:
name: Run Tests
runs-on: ubuntu-24.04
if: ${{ !github.event.pull_request.head.repo.fork || inputs.image != 'plus' }}
if: ${{ inputs.if }}
permissions:
contents: write # needed for uploading release artifacts
env:
Expand Down
Empty file added docs/test
Empty file.