Chore(deps): bump actions/setup-python from 6 to 7 #3913
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: Policy Guard (Upstream) | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| branches: | |
| - main | |
| - develop | |
| - release/** | |
| pull_request_target: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| branches: | |
| - main | |
| - develop | |
| - release/** | |
| merge_group: | |
| branches: | |
| - main | |
| - develop | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '17 3 * * 1' | |
| concurrency: | |
| group: policy-guard-upstream-${{ github.event_name }}-${{ (contains(github.event_name, 'pull_request') && github.event.pull_request.number) || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| policy-guard: | |
| name: Policy Guard (Upstream) / policy-guard | |
| if: >- | |
| (github.event_name == 'pull_request' && | |
| github.event.pull_request.head.repo.full_name == github.repository) || | |
| (github.event_name == 'pull_request_target' && | |
| github.event.pull_request.head.repo.full_name != github.repository) || | |
| (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.owner.login == github.repository_owner && github.event.pull_request.head.repo.full_name || github.repository }} | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.owner.login == github.repository_owner && github.event.pull_request.head.sha || github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha }} | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Workspace health gate | |
| run: | | |
| node tools/priority/check-workspace-health.mjs --repo-root . --lease-mode ignore --report tests/results/_agent/health/policy-guard-workspace-health.json | |
| - name: Prepare policy guard token | |
| shell: pwsh | |
| env: | |
| INPUT_TOKEN_PRIMARY: ${{ secrets.GH_TOKEN }} | |
| INPUT_TOKEN_SECONDARY: ${{ secrets.GITHUB_TOKEN }} | |
| INPUT_TOKEN_TERTIARY: ${{ github.token }} | |
| run: | | |
| pwsh -NoLogo -NoProfile -File tools/priority/Resolve-PolicyToken.ps1 -TokenFileName policy-guard-gh-token.txt | |
| - name: Verify remote refs are unambiguous | |
| shell: pwsh | |
| run: pwsh -NoLogo -NoProfile -File tools/Assert-NoAmbiguousRemoteRefs.ps1 | |
| - name: Overlay personal-fork policy surfaces | |
| if: github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.owner.login != github.repository_owner | |
| run: > | |
| node tools/policy/export-personal-fork-policy-shadow.mjs | |
| --repo "${{ github.event.pull_request.head.repo.full_name }}" | |
| --ref "${{ github.event.pull_request.head.sha }}" | |
| --workspace-root . | |
| --report tests/results/_agent/policy/policy-shadow-export.json | |
| - name: Assert policy guard contract | |
| shell: pwsh | |
| run: | | |
| pwsh -NoLogo -NoProfile -File tools/Assert-PolicyGuardCheckContract.ps1 | |
| - name: Assert promotion contract alignment | |
| shell: pwsh | |
| run: | | |
| pwsh -NoLogo -NoProfile -File tools/Assert-PromotionContractAlignment.ps1 -OutputJsonPath tests/results/_agent/policy/promotion-contract-alignment.json | |
| - name: Run policy guard | |
| shell: pwsh | |
| run: | | |
| pwsh -NoLogo -NoProfile -File tools/priority/Sync-BranchProtectionPolicy.ps1 -FailOnSkip -ResultsDir tests/results/_agent/policy | |
| - name: Verify deployment environment gate policy | |
| shell: pwsh | |
| run: | | |
| node tools/npm/run-script.mjs priority:deployment:gate-policy -- --report tests/results/_agent/deployments/environment-gate-policy.json | |
| - name: Upload policy drift artifact | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: policy-drift-${{ github.run_id }} | |
| path: | | |
| tests/results/_agent/policy/policy-drift-report.json | |
| tests/results/_agent/policy/policy-shadow-export.json | |
| tests/results/_agent/policy/promotion-contract-alignment.json | |
| tests/results/_agent/health/policy-guard-workspace-health.json | |
| tests/results/_agent/deployments/environment-gate-policy.json | |
| if-no-files-found: error |