From 20c1261c2c67b8e2bbc7e3ae0ffe44f4522ead5b Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 21 Mar 2023 09:29:39 +0100 Subject: [PATCH] add file filter check to nginx workflow --- .github/file-filters.yml | 5 ++++- .github/workflows/test-nginx.yml | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/file-filters.yml b/.github/file-filters.yml index 2ae1bf9b4..80b7482d9 100644 --- a/.github/file-filters.yml +++ b/.github/file-filters.yml @@ -40,4 +40,7 @@ federation: &federation - 'federation/**/*' frontend: &frontend - - 'frontend/**/*' \ No newline at end of file + - 'frontend/**/*' + +nginx: &nginx + - 'nginx/**/*' \ No newline at end of file diff --git a/.github/workflows/test-nginx.yml b/.github/workflows/test-nginx.yml index 1b6c91bdf..3409a3042 100644 --- a/.github/workflows/test-nginx.yml +++ b/.github/workflows/test-nginx.yml @@ -3,8 +3,26 @@ name: on: push jobs: + files-changed: + name: Detect File Changes - Frontend + runs-on: ubuntu-latest + outputs: + nginx: ${{ steps.changes.outputs.nginx }} + steps: + - uses: actions/checkout@v3.3.0 + + - name: Check for nginx file changes + uses: dorny/paths-filter@v2.11.1 + id: changes + with: + token: ${{ github.token }} + filters: .github/file-filters.yml + list-files: shell + build_test_nginx: name: Docker Build Test - Nginx + if: needs.files-changed.outputs.nginx == 'true' + needs: files-changed runs-on: ubuntu-latest steps: uses: actions/checkout@v3