From 8ffe58fc5e88ef888ff5c7d4581ee2de1c534611 Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 21 Mar 2023 09:16:02 +0100 Subject: [PATCH 1/4] move nginx test workflow toseparate file --- .github/workflows/test-nginx.yml | 13 +++++++++++++ .github/workflows/test.yml | 25 ------------------------- 2 files changed, 13 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/test-nginx.yml diff --git a/.github/workflows/test-nginx.yml b/.github/workflows/test-nginx.yml new file mode 100644 index 000000000..1b6c91bdf --- /dev/null +++ b/.github/workflows/test-nginx.yml @@ -0,0 +1,13 @@ +name: + +on: push + +jobs: + build_test_nginx: + name: Docker Build Test - Nginx + runs-on: ubuntu-latest + steps: + uses: actions/checkout@v3 + + - name: nginx | Build 'test' image + run: docker build -t "gradido/nginx:test" nginx/ \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1e5f0db02..0fcedb4ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,31 +81,6 @@ jobs: name: docker-mariadb-test path: /tmp/mariadb.tar - ############################################################################## - # JOB: DOCKER BUILD TEST NGINX ############################################### - ############################################################################## - build_test_nginx: - name: Docker Build Test - Nginx - runs-on: ubuntu-latest - steps: - ########################################################################## - # CHECKOUT CODE ########################################################## - ########################################################################## - - name: Checkout code - uses: actions/checkout@v3 - ########################################################################## - # BUILD NGINX DOCKER IMAGE ############################################### - ########################################################################## - - name: nginx | Build `test` image - run: | - docker build -t "gradido/nginx:test" nginx/ - docker save "gradido/nginx:test" > /tmp/nginx.tar - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - name: docker-nginx-test - path: /tmp/nginx.tar - ############################################################################## # JOB: LINT BACKEND ########################################################## ############################################################################## From 20c1261c2c67b8e2bbc7e3ae0ffe44f4522ead5b Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 21 Mar 2023 09:29:39 +0100 Subject: [PATCH 2/4] 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 From a15953468f677cc825509bcd157edc35ad29e274 Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 21 Mar 2023 10:58:37 +0100 Subject: [PATCH 3/4] add name to nginx workflow file --- .github/workflows/test-nginx.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-nginx.yml b/.github/workflows/test-nginx.yml index 3409a3042..5d39c493e 100644 --- a/.github/workflows/test-nginx.yml +++ b/.github/workflows/test-nginx.yml @@ -1,4 +1,4 @@ -name: +name: Gradido Nginx Test CI on: push From 521bb3b2009ac8ebc6bc11e821d4cac2849bcf5f Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 21 Mar 2023 12:21:52 +0100 Subject: [PATCH 4/4] fix nginx workflow file --- .github/workflows/test-nginx.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-nginx.yml b/.github/workflows/test-nginx.yml index 5d39c493e..146e7a117 100644 --- a/.github/workflows/test-nginx.yml +++ b/.github/workflows/test-nginx.yml @@ -4,7 +4,7 @@ on: push jobs: files-changed: - name: Detect File Changes - Frontend + name: Detect File Changes - Nginx runs-on: ubuntu-latest outputs: nginx: ${{ steps.changes.outputs.nginx }} @@ -25,7 +25,8 @@ jobs: needs: files-changed runs-on: ubuntu-latest steps: + - name: Checkout code uses: actions/checkout@v3 - name: nginx | Build 'test' image - run: docker build -t "gradido/nginx:test" nginx/ \ No newline at end of file + run: docker build -t "gradido/nginx:test" nginx/