Skip to content

Backlog/v12 gcp topic #103

Backlog/v12 gcp topic

Backlog/v12 gcp topic #103

Workflow file for this run

name: PR Checks
on:
pull_request:
branches:
- 'release/**'
- 'v10'
- 'v11'
# Cancel previous runs when new commits are pushed to the same PR.
concurrency:
group: pr-checks-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
checks: write
jobs:
ai_review:
name: AI review
uses: ./.github/workflows/_pr-reusable-ai-review.yml
secrets:
THREATWINDS_API_KEY: ${{ secrets.THREATWINDS_API_KEY }}
THREATWINDS_API_SECRET: ${{ secrets.THREATWINDS_API_SECRET }}
approver:

Check failure on line 28 in .github/workflows/pr-checks.yml

View workflow run for this annotation

GitHub Actions / PR Checks

Invalid workflow file

The workflow is not valid. .github/workflows/pr-checks.yml (Line: 28, Col: 3): Error calling workflow 'utmstack/UTMStack/.github/workflows/_pr-reusable-approver.yml@b63eea3c52109ec9125a4883d545d4fdc818717f'. The workflow is requesting 'contents: write', but is only allowed 'contents: read'.
name: Approver
needs:
- ai_review
uses: ./.github/workflows/_pr-reusable-approver.yml
with:
tier3_reviewers: 'Kbayero,osmontero'
secrets:
APPROVER_APP_ID: ${{ secrets.APPROVER_APP_ID }}
APPROVER_PRIVATE_KEY: ${{ secrets.APPROVER_PRIVATE_KEY }}
API_SECRET: ${{ secrets.API_SECRET }}
all_checks_passed:
name: All checks passed
if: always()
needs:
- ai_review
- approver
runs-on: ubuntu-24.04
steps:
- name: Verify all required check jobs succeeded
env:
NEEDS_JSON: ${{ toJson(needs) }}
run: |
echo "Dependent job results:"
echo "$NEEDS_JSON" | jq -r 'to_entries[] | " \(.key): \(.value.result)"'
failed=$(echo "$NEEDS_JSON" | jq -r 'to_entries[] | select(.value.result != "success" and .value.result != "skipped") | .key')
if [ -n "$failed" ]; then
echo ""
echo "❌ The following jobs did not succeed:"
echo "$failed" | sed 's/^/ - /'
exit 1
fi
echo ""
echo "✅ All required checks passed."