-
Notifications
You must be signed in to change notification settings - Fork 2
31 lines (24 loc) · 887 Bytes
/
FileSafetyMGR.yml
File metadata and controls
31 lines (24 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Trusted Script Execution
on:
pull_request:
types: [opened]
jobs:
review_script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Review Pull Request
id: review
run: echo "Reviewing script..."
- name: Check if Approved
id: check_approval
run: echo "::set-output name=approved::$(echo '${{ github.event.pull_request.body }}' | grep -q 'Approved by maintainer' && echo 'true' || echo 'false')"
- name: Execute Script
if: steps.check_approval.outputs.approved == 'true'
run: |
echo "Script looks trustworthy and is approved."
./your-script.sh
- name: Notify about Review
if: steps.check_approval.outputs.approved == 'false'
run: echo "Script requires approval from a maintainer before execution."