From 93f8467b339da93adf82cac7f7f571de7ab9a5d3 Mon Sep 17 00:00:00 2001 From: MuneebAijaz Date: Tue, 6 Aug 2024 10:52:22 +0500 Subject: [PATCH] test docs workflow --- .github/workflows/pull_request.yaml | 24 +++++++++++++++++++----- .github/workflows/push.yaml | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 4125801..33c833d 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -56,6 +56,25 @@ jobs: check-latest: true cache: true + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + docs: + - '.markdownlint.yaml' + - '.vale.ini' + - 'Dockerfile-docs' + - 'docs-nginx.conf' + - 'docs/**' + - 'README.md' + - 'theme_common' + - 'theme_override' + + # run only if 'workflows' files were changed + - name: workflow tests + if: steps.filter.outputs.docs == 'true' + run: echo "Workflow file" + # Get highest tag and remove any suffixes with '-' - name: Get Highest tag id: highest_tag @@ -63,11 +82,6 @@ jobs: highest=$(git tag -l --sort -version:refname | head -n 1) echo "tag=${highest%%-*}" >> $GITHUB_OUTPUT - # Get highest tag and remove any suffixes with '-' - - name: Print Highest tag - run: | - echo ${{ steps.highest_tag.outputs.tag }} - - name: Install Dependencies run: | make install diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index b29120e..463e578 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -173,6 +173,25 @@ jobs: org.opencontainers.image.created=${{ steps.prep.outputs.created }} org.opencontainers.image.revision=${{ github.sha }} + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + docs: + - '.markdownlint.yaml' + - '.vale.ini' + - 'Dockerfile-docs' + - 'docs-nginx.conf' + - 'docs/**' + - 'README.md' + - 'theme_common' + - 'theme_override' + + # run only if 'workflows' files were changed + - name: workflow tests + if: steps.filter.outputs.docs == 'true' + run: echo "Workflow file" + ############################## ## Add steps to generate required artifacts for a release here(helm chart, operator manifest etc.) ##############################