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 new file mode 100644 index 000000000..146e7a117 --- /dev/null +++ b/.github/workflows/test-nginx.yml @@ -0,0 +1,32 @@ +name: Gradido Nginx Test CI + +on: push + +jobs: + files-changed: + name: Detect File Changes - Nginx + 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: + - name: Checkout code + uses: actions/checkout@v3 + + - name: nginx | Build 'test' image + run: docker build -t "gradido/nginx:test" nginx/ 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 ########################################################## ##############################################################################