chore(deps): bump the actions group with 2 updates #199
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
| # SPDX-License-Identifier: MPL-2.0 | |
| name: Language Policy Enforcement | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| # Estate guardrail: cancel superseded runs so re-pushes / rebased PR | |
| # updates do not pile up queued runs against the shared account-wide | |
| # Actions concurrency pool. Applied only to read-only check workflows | |
| # (no publish/mutation), so cancelling a superseded run is always safe. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: read-all | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4 | |
| - name: Enforce language policies | |
| run: | | |
| # Block new Python files (except SaltStack) | |
| NEW_PY=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.py$' | grep -v 'salt' || true) | |
| if [ -n "$NEW_PY" ]; then | |
| echo "❌ New Python files detected. Use Rust or AffineScript instead." | |
| echo "$NEW_PY" | |
| exit 1 | |
| fi | |
| # Block new Ruby files | |
| NEW_RB=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.rb$' || true) | |
| if [ -n "$NEW_RB" ]; then | |
| echo "❌ New Ruby files detected. Use Rust, Ada/SPARK, or Crystal instead." | |
| echo "$NEW_RB" | |
| exit 1 | |
| fi | |
| # Block new Perl files | |
| NEW_PL=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(pl|pm)$' || true) | |
| if [ -n "$NEW_PL" ]; then | |
| echo "❌ New Perl files detected. Use Rust instead." | |
| echo "$NEW_PL" | |
| exit 1 | |
| fi | |
| # Block new Java/Kotlin (except in LSP projects) | |
| if [[ ! "$GITHUB_REPOSITORY" =~ "language-server" ]]; then | |
| NEW_JAVA=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(java|kt)$' || true) | |
| if [ -n "$NEW_JAVA" ]; then | |
| echo "❌ New Java/Kotlin files detected. Use Rust instead." | |
| echo "$NEW_JAVA" | |
| exit 1 | |
| fi | |
| fi | |
| echo "✅ Language policy check passed" |