mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #2871 from gradido/separate-nginx-workflow
refactor(workflow): separate workflow with file filter for nginx testing
This commit is contained in:
commit
3db17ff812
3
.github/file-filters.yml
vendored
3
.github/file-filters.yml
vendored
@ -41,3 +41,6 @@ federation: &federation
|
|||||||
|
|
||||||
frontend: &frontend
|
frontend: &frontend
|
||||||
- 'frontend/**/*'
|
- 'frontend/**/*'
|
||||||
|
|
||||||
|
nginx: &nginx
|
||||||
|
- 'nginx/**/*'
|
||||||
32
.github/workflows/test-nginx.yml
vendored
Normal file
32
.github/workflows/test-nginx.yml
vendored
Normal file
@ -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/
|
||||||
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
@ -81,31 +81,6 @@ jobs:
|
|||||||
name: docker-mariadb-test
|
name: docker-mariadb-test
|
||||||
path: /tmp/mariadb.tar
|
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 ##########################################################
|
# JOB: LINT BACKEND ##########################################################
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user