Skip to content

Commit

Permalink
harden label_on_approval.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed Jan 10, 2024
1 parent 55e4c4d commit 28c6b3b
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/label_on_approval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ on:
- review_requested

permissions:
checks: write
contents: read
pull-requests: write

jobs:
label_approved:
name: Label on Approval
runs-on: ubuntu-latest
if: |
(!contains(github.event.pull_request.labels.*.name, 'approved')) &&
(github.event.review.state == 'approved') &&
(github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
pull-requests: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
Expand All @@ -40,11 +42,19 @@ jobs:
comment_approved:
name: Comment Concerning Approved Tag
runs-on: ubuntu-latest
if: |
(github.event_name == 'pull_request_target') &&
(github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
pull-requests: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- name: Find comment
uses: peter-evans/[email protected]
id: fc
Expand Down

0 comments on commit 28c6b3b

Please sign in to comment.