Skip to content

Commit

Permalink
Add action
Browse files Browse the repository at this point in the history
  • Loading branch information
DebugOk committed Feb 15, 2024
1 parent 77c4a5a commit f06e62b
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/check-ignored-prototype.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "No ignored prototype edits"

on:
pull_request_target:

jobs:
verify-ignored:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: Read ignored prototypes
uses: pietrobolcato/[email protected]
id: ignored_protos
with:
config: ${{ github.workspace }}/Resources/IgnoredPrototypes/ignoredPrototypes.yml

- name: Get changed files
id: files
uses: Ana06/[email protected]
with:
format: 'space-delimited'

- name: Check for ignored prototypes
run: |
CHANGED_FILES="${{ steps.files.outputs.files }}"
IGNORED_PROTOS="${{ steps.ignored_protos.outputs }}"
for FILE in $CHANGED_FILES; do
# Remove the "/Resources/" prefix if present
FILE="${FILE/\/Resources\//}"
if echo "$IGNORED_PROTOS" | grep -q "$FILE"; then
echo "Error: This pull request contains changes to ignored prototype: $FILE"
exit 1
fi
done

0 comments on commit f06e62b

Please sign in to comment.