-
Notifications
You must be signed in to change notification settings - Fork 60
61 lines (48 loc) · 1.55 KB
/
auto-review-merge.yaml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: automated-pr-review
on:
workflow_dispatch:
schedule:
- cron: '42 * * * *'
permissions:
contents: read
jobs:
enable-auto-merge:
runs-on: ubuntu-latest
if: github.repository == 'wolfi-dev/advisories'
permissions:
contents: read
id-token: write # needed for Octo STS federation
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Check out repository code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: octo-sts/action@6177b4481c00308b3839969c3eca88c96a91775f # v1.0.0
id: octo-sts
with:
scope: wolfi-dev/advisories
identity: enable-auto-merge
- run: |
./scripts/enable-auto-merge.sh ${{ github.repository }}
env:
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
review-pr:
runs-on: ubuntu-latest
if: github.repository == 'wolfi-dev/advisories'
needs: enable-auto-merge
permissions:
contents: read
pull-requests: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Check out repository code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: |
./scripts/review-prs.sh ${{ github.repository }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}