Fixed syntax for workflow #2
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: Vault Audit Thread Resolved | ||
| # Fires when any PR review thread is resolved. Calls the cre-docs override-check | ||
| # reusable workflow to re-evaluate whether all blocking vault audit findings are resolved | ||
| # and updates the commit status accordingly. | ||
| on: | ||
| pull_request_review_thread: | ||
| types: [resolved] | ||
| jobs: | ||
| check-auth: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: read | ||
| outputs: | ||
| authorized: ${{ steps.auth.outputs.authorized }} | ||
| steps: | ||
| - name: Check resolver authorization | ||
| id: auth | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| RESOLVER="${{ github.event.sender.login }}" | ||
| PERMISSION=$(gh api /repos/${{ github.repository }}/collaborators/$RESOLVER/permission \ | ||
| --jq '.permission' 2>/dev/null || echo "none") | ||
| if [[ "$PERMISSION" == "write" || "$PERMISSION" == "admin" ]]; then | ||
| echo "authorized=true" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "authorized=false" >> $GITHUB_OUTPUT | ||
| fi | ||
| # Reusable workflows must be called as a top-level job, not a step | ||
| run-override-check: | ||
| needs: check-auth | ||
| if: needs.check-auth.outputs.authorized == 'true' | ||
| uses: smartcontractkit/cre-docs/.github/workflows/vault-audit-override-check.yml@main | ||
| permissions: | ||
| statuses: write | ||
| pull-requests: read | ||
| with: | ||
| pr_number: ${{ github.event.pull_request.number }} | ||
| head_sha: ${{ github.event.pull_request.head.sha }} | ||
| chainlink_repo: ${{ github.repository }} | ||
| secrets: | ||
| CHAINLINK_TOKEN: ${{ github.token }} | ||