Fix release dry-run tarball smoke #51
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
| name: Agent Law | |
| on: | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| agent-law: | |
| name: agent-law | |
| runs-on: ${{ vars.RUNNER_LABEL || 'ubuntu-latest' }} | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| persist-credentials: false | |
| - name: Verify Empower Orchestrator law | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| fail=0 | |
| require_file() { | |
| local path="$1" | |
| if [[ ! -f "$path" ]]; then | |
| echo "::error file=$path::Required agent-law file is missing" | |
| fail=1 | |
| fi | |
| } | |
| require_marker() { | |
| local path="$1" | |
| if [[ ! -f "$path" ]]; then | |
| echo "::error file=$path::Required file is missing" | |
| fail=1 | |
| return | |
| fi | |
| if ! grep -q 'EMPOWER_ORCHESTRATOR:START' "$path"; then | |
| echo "::error file=$path::Missing EMPOWER_ORCHESTRATOR marker" | |
| fail=1 | |
| fi | |
| } | |
| require_file "docs/agent-law/empower-orchestrator.md" | |
| require_marker "AGENTS.md" | |
| require_marker "CLAUDE.md" | |
| if [[ ! -f ".github/pull_request_template.md" && ! -f ".github/PULL_REQUEST_TEMPLATE.md" && ! -f "pull_request_template.md" && ! -f "PULL_REQUEST_TEMPLATE.md" && ! -f "docs/pull_request_template.md" && ! -f "docs/PULL_REQUEST_TEMPLATE.md" ]]; then | |
| echo "::error::.github/pull_request_template.md or equivalent PR template is required" | |
| fail=1 | |
| elif ! grep -R -q 'EMPOWER_ORCHESTRATOR:START' .github/pull_request_template.md .github/PULL_REQUEST_TEMPLATE.md pull_request_template.md PULL_REQUEST_TEMPLATE.md docs/pull_request_template.md docs/PULL_REQUEST_TEMPLATE.md 2>/dev/null; then | |
| echo "::error::PR template exists but lacks EMPOWER_ORCHESTRATOR marker" | |
| fail=1 | |
| fi | |
| if ! grep -q 'four-question blast-radius check' docs/agent-law/empower-orchestrator.md; then | |
| echo "::error file=docs/agent-law/empower-orchestrator.md::Recipe must name the four-question blast-radius check" | |
| fail=1 | |
| fi | |
| if [[ "$fail" != 0 ]]; then | |
| exit 1 | |
| fi | |
| echo "Empower Orchestrator agent law is present." |