Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/notify-policy-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Notify Policy Changes

on:
push:
branches: [main]
paths:
- 'Boolti/Boolti/Sources/**'

jobs:
dispatch:
name: Dispatch to boolti-docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Collect changed files
id: changes
run: |
FILES=$(git diff --name-only HEAD~1 HEAD -- \
'Boolti/Boolti/Sources/**')
COUNT=$(echo "$FILES" | wc -l | tr -d ' ')
LIST=$(echo "$FILES" | head -10 | sed 's/^/- /' | jq -Rs '.')
LIST=${LIST:1:-1} # strip outer quotes from jq output
echo "count=$COUNT" >> $GITHUB_OUTPUT
{
echo "list<<EOF"
echo "$LIST"
echo "EOF"
} >> $GITHUB_OUTPUT

- name: Dispatch to boolti-docs
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.DOCS_DISPATCH_TOKEN }}
repository: ryanproback/boolti-docs
event-type: policy-changed
client-payload: |
{
"source_repo": "Nexters/Boolti-iOS",
"commit_sha": "${{ github.sha }}",
"file_count": "${{ steps.changes.outputs.count }}",
"changed_files": "${{ steps.changes.outputs.list }}"
}