25 lines
676 B
YAML
25 lines
676 B
YAML
name: Block app edits
|
|
|
|
on: ["pull_request"]
|
|
|
|
jobs:
|
|
block:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: "2" # To retrieve the preceding commit.
|
|
|
|
- name: Get changed files using defaults
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@v23
|
|
- name: List all added files
|
|
run: |
|
|
for file in ${{ steps.changed-files.outputs.all_changed_and_modified_files }}; do
|
|
echo "$file"
|
|
done
|
|
|
|
- name: Block edits in docs/source-app
|
|
if: contains(steps.changed-files.outputs.all_changed_and_modified_files, 'docs/source-app')
|
|
run: exit 1
|