Clarify SDK runtime architecture #3175
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright (c) Microsoft Corporation. All rights reserved. | |
| name: "Block remove-before-merge paths" | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review, edited] | |
| merge_group: | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-paths: | |
| name: "No remove-before-merge directories" | |
| if: github.event_name == 'pull_request' && github.base_ref == 'main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| timeout-minutes: 4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Check for remove-before-merge paths in PR | |
| run: | | |
| # pull_request checks out the merge commit; its first parent is the base. | |
| git rev-parse --verify HEAD^2 >/dev/null 2>&1 || { | |
| echo "::error::Expected a pull request merge commit." | |
| exit 1 | |
| } | |
| FILES_FILE=$(mktemp) | |
| trap 'rm -f "$FILES_FILE"' EXIT | |
| git diff --name-only -z HEAD^1 HEAD > "$FILES_FILE" | |
| if grep -zqE '(^|/)[-a-zA-Z0-9_]+-remove-before-merge(/|$)' "$FILES_FILE"; then | |
| echo "::error::This PR contains files under a 'remove-before-merge' directory. Remove them before merging." | |
| echo "" | |
| echo "Offending paths:" | |
| grep -zE '(^|/)[-a-zA-Z0-9_]+-remove-before-merge(/|$)' "$FILES_FILE" | tr '\0' '\n' | |
| exit 1 | |
| fi | |
| echo "No remove-before-merge paths found. ✅" |