QVAC-18183 feat[api]: inference-handler migrations #6960
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
| # it actually works now | |
| name: Approval Check Worker | |
| on: | |
| issue_comment: | |
| types: [created] | |
| pull_request_review: | |
| types: [submitted] | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| issues: write | |
| statuses: read | |
| jobs: | |
| run-when-command: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| number: ${{ steps.pr.outputs.number }} | |
| sha: ${{ steps.pr.outputs.sha }} | |
| steps: | |
| - name: Get latest PR head SHA | |
| id: pr | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # 8.0.0 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const prNumber = context.payload.issue?.number ?? context.payload.pull_request?.number; | |
| if (!prNumber) { | |
| core.setFailed('Could not determine pull request number from event payload'); | |
| return; | |
| } | |
| const { data: pr } = await github.rest.pulls.get({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: prNumber, | |
| }); | |
| core.setOutput('number', String(prNumber)); | |
| core.setOutput('sha', pr.head.sha); | |
| check-approvals: | |
| needs: run-when-command | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| statuses: write | |
| issues: write | |
| uses: ./.github/workflows/approval-check-worker.yml | |
| secrets: | |
| pat_token: ${{ secrets.PAT_TOKEN }} | |
| with: | |
| pr_number: ${{ fromJSON(needs.run-when-command.outputs.number) }} | |
| pr_sha: ${{ needs.run-when-command.outputs.sha }} |