Remove gh-actions approval workflows in favor of new repo setting (#4525)
* Remove gh-actions approval workflows in favor of new repo setting
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
name: PR Approval Check
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Receive PR"]
|
||||
types: ["completed"]
|
||||
|
||||
permissions:
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
approval:
|
||||
runs-on: ubuntu-slim
|
||||
steps:
|
||||
- name: Download artifact from triggering run
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
run-id: ${{ github.event.workflow_run.id }}
|
||||
name: prnum
|
||||
github-token: ${{ github.token }}
|
||||
|
||||
- name: Read inputs
|
||||
id: get-prnum
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo "prnum=$(cat prnum.txt)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Mint installation token
|
||||
id: app-token
|
||||
uses: actions/[email protected]
|
||||
with:
|
||||
app-id: ${{ secrets.PR_APPROVAL_CHECK_APP_ID }}
|
||||
private-key: ${{ secrets.PR_APPROVAL_CHECK }}
|
||||
|
||||
- name: Require Product Eng approval
|
||||
uses: trufflesecurity/pr-approval-check@main
|
||||
with:
|
||||
org: trufflesecurity
|
||||
approver_team: product-eng
|
||||
owner: ${{ github.event.workflow_run.repository.owner.login }}
|
||||
repo: ${{ github.event.workflow_run.repository.name }}
|
||||
head: ${{ github.event.workflow_run.head_sha }}
|
||||
number: ${{ steps.get-prnum.outputs.prnum }}
|
||||
github_token: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
name: "Receive PR"
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
pull_request_review:
|
||||
types: [submitted, edited, dismissed]
|
||||
|
||||
jobs:
|
||||
prnum:
|
||||
runs-on: ubuntu-slim
|
||||
steps:
|
||||
- name: Determine PR Number
|
||||
id: build
|
||||
run: |
|
||||
echo "PR: ${{ github.event.pull_request.number }}"
|
||||
echo "${{ github.event.pull_request.number }}" > prnum.txt
|
||||
- name: Submit
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: prnum
|
||||
path: prnum.txt
|
||||
retention-days: 1
|
||||
|
||||
Reference in New Issue
Block a user