Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfgebhardt committed Feb 27, 2024
1 parent fb3250d commit cadc442
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/file-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ presenter-test-unit-code: &presenter-test-unit-code
presenter-test-build-code: &presenter-test-build-code
- 'presenter/**/*'

presenter-test-build-docker: &presenter-test-build-docker
- 'presenter/**/*'


presenter-test-build-docs: &presenter-test-build-docs
- 'presenter/**/*.md'
- 'presenter/.vuepress/*'
Expand All @@ -30,6 +34,9 @@ backend-test-unit-code: &backend-test-unit-code
backend-test-build-code: &backend-test-build-code
- 'backend/**/*'

backend-test-build-docker: &backend-test-build-docker
- 'backend/**/*'

backend-test-build-docs: &backend-test-build-docs
- 'backend/**/*.md'
- 'backend/.vuepress/*'
10 changes: 8 additions & 2 deletions .github/workflows/backend.test.build.docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
- name: Check for backend file changes
uses: dorny/paths-filter@v3.0.1
id: changes
with:
Expand All @@ -26,21 +26,27 @@ jobs:
name: Build Docker Production - Backend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./backend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Backend | Build Docker Production
run: docker compose -f docker-compose.yml build
working-directory: ${{env.WORKING_DIRECTORY}}

build-development:
if: needs.files-changed.outputs.changes == 'true'
name: Build Docker Development - Backend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./backend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Backend | Build Docker Development
run: docker compose build
run: docker compose build
working-directory: ${{env.WORKING_DIRECTORY}}
52 changes: 52 additions & 0 deletions .github/workflows/presenter.test.build.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "presenter:test:build test docker"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - presenter-test-build-docker
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.presenter-test-build-docker }}
steps:
- uses: actions/checkout@v4

- name: Check for presenter file changes
uses: dorny/paths-filter@v3.0.1
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

build-production:
if: needs.files-changed.outputs.changes == 'true'
name: Build Docker Production - Presenter
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./presenter
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Presenter | Build Docker Production
run: docker compose -f docker-compose.yml build
working-directory: ${{env.WORKING_DIRECTORY}}

build-development:
if: needs.files-changed.outputs.changes == 'true'
name: Build Docker Development - Presenter
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./presenter
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Presenter | Build Docker Development
run: docker compose build
working-directory: ${{env.WORKING_DIRECTORY}}

0 comments on commit cadc442

Please sign in to comment.