93c6a9a652
Inspired by https://github.com/go-gitea/gitea/pull/24530#issuecomment-1558815301 This PR use a file filter action to do different CI jobs according changed files types. All types are defined in `.github/file-filters.yml`. Now there are 4 types, `docs`, `backend`, `frontend` and `build`. Then if a PR only changed docs files, those CI jobs which passed the conditions will run, and other types are also like this. --------- Co-authored-by: silverwind <me@silverwind.io>
24 lines
531 B
YAML
24 lines
531 B
YAML
name: compliance-docs
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
files-changed:
|
|
uses: ./.github/workflows/files-changed.yml
|
|
|
|
compliance-docs:
|
|
if: needs.files-changed.outputs.docs == 'true'
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 20
|
|
- run: make deps-frontend
|
|
- run: make lint-md
|