|
37 | 37 | name: Checks and variables
|
38 | 38 | runs-on: ubuntu-22.04
|
39 | 39 | outputs:
|
| 40 | + docs_only: ${{ github.event.pull_request && steps.docs.outputs.docs_only == 'true' }} |
40 | 41 | k8s_latest: ${{ steps.vars.outputs.k8s_latest }}
|
41 | 42 | latest_kindest_node_versions: ${{ steps.vars.outputs.latest_kindest_node_versions }}
|
42 | 43 | go_path: ${{ steps.vars.outputs.go_path }}
|
|
52 | 53 | steps:
|
53 | 54 | - name: Checkout Repository
|
54 | 55 | uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
| 56 | + with: |
| 57 | + fetch-depth: 0 |
| 58 | + |
| 59 | + - name: Filter only docs changes |
| 60 | + id: docs |
| 61 | + run: | |
| 62 | + files=$(git diff --name-only HEAD^ | egrep -v "^docs/") |
| 63 | + if [ -z "$files" ]; then |
| 64 | + echo "docs_only=true" >> $GITHUB_OUTPUT |
| 65 | + else |
| 66 | + echo "docs_only=false" >> $GITHUB_OUTPUT |
| 67 | + fi |
| 68 | + echo $files |
| 69 | + cat $GITHUB_OUTPUT |
| 70 | + shell: bash --noprofile --norc -o pipefail {0} |
55 | 71 |
|
56 | 72 | - name: Setup Golang Environment
|
57 | 73 | uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
|
@@ -241,6 +257,7 @@ jobs:
|
241 | 257 | if: ${{ needs.checks.outputs.binary_cache_hit != 'true' }}
|
242 | 258 |
|
243 | 259 | helm-tests:
|
| 260 | + if: ${{ needs.checks.outputs.docs_only != 'true' }} |
244 | 261 | name: Helm Tests ${{ matrix.base-os }}
|
245 | 262 | runs-on: ubuntu-22.04
|
246 | 263 | needs: [checks, binaries]
|
@@ -390,6 +407,7 @@ jobs:
|
390 | 407 | done
|
391 | 408 |
|
392 | 409 | setup-matrix:
|
| 410 | + if: ${{ needs.checks.outputs.docs_only != 'true' }} |
393 | 411 | name: Setup Matrix for Smoke Tests
|
394 | 412 | runs-on: ubuntu-22.04
|
395 | 413 | needs: [binaries, checks]
|
@@ -451,6 +469,7 @@ jobs:
|
451 | 469 | if: ${{ steps.check-image.outcome == 'failure' }}
|
452 | 470 |
|
453 | 471 | smoke-tests:
|
| 472 | + if: ${{ needs.checks.outputs.docs_only != 'true' }} |
454 | 473 | name: ${{ matrix.images.label }} ${{ matrix.images.image }} ${{ matrix.k8s }} smoke tests
|
455 | 474 | runs-on: ubuntu-22.04
|
456 | 475 | needs: [checks, setup-matrix]
|
@@ -619,6 +638,7 @@ jobs:
|
619 | 638 | fi
|
620 | 639 |
|
621 | 640 | build-docker:
|
| 641 | + if: ${{ needs.checks.outputs.docs_only != 'true' }} |
622 | 642 | name: Build Docker OSS
|
623 | 643 | needs: [checks, smoke-results]
|
624 | 644 | strategy:
|
@@ -647,6 +667,7 @@ jobs:
|
647 | 667 | secrets: inherit
|
648 | 668 |
|
649 | 669 | build-docker-plus:
|
| 670 | + if: ${{ needs.checks.outputs.docs_only != 'true' }} |
650 | 671 | name: Build Docker Plus
|
651 | 672 | needs: [checks, smoke-results, release-notes]
|
652 | 673 | strategy:
|
@@ -678,6 +699,7 @@ jobs:
|
678 | 699 | secrets: inherit
|
679 | 700 |
|
680 | 701 | build-docker-nap:
|
| 702 | + if: ${{ needs.checks.outputs.docs_only != 'true' }} |
681 | 703 | name: Build Docker NAP
|
682 | 704 | needs: [checks, smoke-results, release-notes]
|
683 | 705 | strategy:
|
|
0 commit comments