add file change check to test admin workflow

This commit is contained in:
mahula 2023-02-21 10:42:47 +01:00
parent 225a8239ec
commit d411ca7682
2 changed files with 23 additions and 0 deletions

4
.github/file-filters.yml vendored Normal file
View File

@ -0,0 +1,4 @@
# These file filter patterns are used by the action https://github.com/dorny/paths-filter
admin_locales: &admin_locales
- 'admin/src/locales/**'

View File

@ -6,6 +6,23 @@ on:
- separate-admin-interface-workflow
jobs:
#
files-changed:
name: Detect File Changes - Admin Interface
runs-on: ubuntu-latest
outputs:
admin_locales: ${{ steps.changes.outputs.admin_locales }}
steps:
- uses: actions/checkout@v3.3.0
- name: Check for admin interface 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_admin:
name: Docker Build Test - Admin Interface
runs-on: ubuntu-latest
@ -59,7 +76,9 @@ jobs:
run: cd admin && yarn && yarn run stylelint
locales_admin:
if: needs.files-changed.outputs.admin_locales == 'true'
name: Locales - Admin Interface
needs: files-changed
runs-on: ubuntu-latest
steps:
- name: Checkout code