Skip to content

Commit

Permalink
workflows for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfgebhardt committed Apr 18, 2024
1 parent b89d7e2 commit 30fb59e
Show file tree
Hide file tree
Showing 22 changed files with 98 additions and 220 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,26 @@ updates:
timezone: "Europe/Berlin"
time: "03:00"

# admin
- package-ecosystem: npm
open-pull-requests-limit: 999
directory: "/admin"
rebase-strategy: "disabled"
schedule:
interval: weekly
day: "saturday"
timezone: "Europe/Berlin"
time: "03:00"
- package-ecosystem: docker
open-pull-requests-limit: 999
directory: "/admin"
rebase-strategy: "disabled"
schedule:
interval: weekly
day: "saturday"
timezone: "Europe/Berlin"
time: "03:00"

# frontend
- package-ecosystem: npm
open-pull-requests-limit: 999
Expand Down
21 changes: 21 additions & 0 deletions .github/file-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,27 @@ frontend-test-build-docs: &frontend-test-build-docs
frontend-test-build-storybook: &frontend-test-build-storybook
- 'frontend/**/*'

# admin
admin-test-lint-code: &admin-test-lint-code
- 'admin/**/*'

admin-test-unit-code: &admin-test-unit-code
- 'admin/**/*'

admin-test-build-code: &admin-test-build-code
- 'admin/**/*'

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

admin-test-build-docs: &admin-test-build-docs
- 'admin/**/*.md'
- 'admin/.vuepress/*'

admin-test-build-storybook: &admin-test-build-storybook
- 'admin/**/*'


# backend
backend-test-lint-code: &backend-test-lint-code
- 'backend/**/*'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
name: "frontend:deploy:chromatic"
name: "admin:deploy:chromatic"
on:
push:
branches:
- master
jobs:
build-and-deploy:
name: Chromatic - Frontend
name: Chromatic - Admin
runs-on: ubuntu-latest
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN_ADMIN }}
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Frontend | Build
- name: Admin | Build
run: npm install && npm run chromatic -- --exit-zero-on-changes
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: "frontend:test:build test code"
name: "admin:test:build test code"

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 - frontend-test-build-code
name: Detect File Changes - admin-test-build-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.frontend-test-build-code }}
changes: ${{ steps.changes.outputs.admin-test-build-code }}
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
- name: Check for admin file changes
uses: dorny/[email protected]
id: changes
with:
Expand All @@ -23,12 +23,14 @@ jobs:

build:
if: needs.files-changed.outputs.changes == 'true'
name: Build - Frontend
name: Build - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Build
- name: Admin | Build
run: npm install && npm run build
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: "frontend:test:build test docker"
name: "admin: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 - frontend-test-build-docker
name: Detect File Changes - admin-test-build-docker
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.frontend-test-build-docker }}
changes: ${{ steps.changes.outputs.admin-test-build-docker }}
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
- name: Check for admin file changes
uses: dorny/[email protected]
id: changes
with:
Expand All @@ -23,24 +23,28 @@ jobs:

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

- name: Frontend | Build Docker Production
- name: Admin | Build Docker Production
run: docker compose -f docker-compose.yml build

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

- name: Frontend | Build Docker Development
- name: Admin | Build Docker Development
run: docker compose build
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: "frontend:test:build test docs"
name: "admin:test:build test docs"

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 - frontend-test-build-docs
name: Detect File Changes - admin-test-build-docs
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.frontend-test-build-docs }}
changes: ${{ steps.changes.outputs.admin-test-build-docs }}
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
- name: Check for admin file changes
uses: dorny/[email protected]
id: changes
with:
Expand All @@ -23,12 +23,14 @@ jobs:

build:
if: needs.files-changed.outputs.changes == 'true'
name: Build Docs - Frontend
name: Build Docs - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Build Docs
- name: Admin | Build Docs
run: npm install && npm run docs:build
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: "frontend:test:build test storybook"
name: "admin:test:build test storybook"

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 - frontend-test-build-storybook
name: Detect File Changes - admin-test-build-storybook
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.frontend-test-build-storybook }}
changes: ${{ steps.changes.outputs.admin-test-build-storybook }}
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
- name: Check for admin file changes
uses: dorny/[email protected]
id: changes
with:
Expand All @@ -23,12 +23,14 @@ jobs:

storybook:
if: needs.files-changed.outputs.changes == 'true'
name: Build Storybook - Frontend
name: Build Storybook - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Build Storybook
- name: Admin | Build Storybook
run: npm install && npm run storybook:build
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: "frontend:test:lint code with defined linters"
name: "admin:test:lint code with defined linters"

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 - frontend-test-lint-code
name: Detect File Changes - admin-test-lint-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.frontend-test-lint-code }}
changes: ${{ steps.changes.outputs.admin-test-lint-code }}
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
- name: Check for admin file changes
uses: dorny/[email protected]
id: changes
with:
Expand All @@ -23,12 +23,14 @@ jobs:

lint:
if: needs.files-changed.outputs.changes == 'true'
name: Lint - Frontend
name: Lint - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Lint
- name: Admin | Lint
run: npm install && npm run test:lint
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: "frontend:test:unit test code with defined suites"
name: "admin:test:unit test code with defined suites"

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 - frontend-test-unit-code
name: Detect File Changes - admin-test-unit-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.frontend-test-unit-code }}
changes: ${{ steps.changes.outputs.admin-test-unit-code }}
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
- name: Check for admin file changes
uses: dorny/[email protected]
id: changes
with:
Expand All @@ -23,12 +23,14 @@ jobs:

unit:
if: needs.files-changed.outputs.changes == 'true'
name: Unit - Frontend
name: Unit - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Unit
- name: Admin | Unit
run: npm install && npm run test:unit
1 change: 0 additions & 1 deletion admin/.github/.remarkignore

This file was deleted.

13 changes: 0 additions & 13 deletions admin/.github/ISSUE_TEMPLATE.md

This file was deleted.

10 changes: 0 additions & 10 deletions admin/.github/ISSUE_TEMPLATE/bug.md

This file was deleted.

10 changes: 0 additions & 10 deletions admin/.github/ISSUE_TEMPLATE/devops.md

This file was deleted.

Loading

0 comments on commit 30fb59e

Please sign in to comment.