-
Notifications
You must be signed in to change notification settings - Fork 334
41 lines (34 loc) · 1.19 KB
/
on_pull_request_target_contrib.yml
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
# Jobs that only run for external contributors.
# These have to be carefully sanitized, we don't want to leak secrets.
name: Pull-Request-Target (Contrib)
on:
# This will run workflows triggered by a pull request from the _base_ branch.
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
pull_request_target:
types:
- opened
- synchronize
permissions:
contents: "read"
pull-requests: "write" # Updates PR body
jobs:
update-pr-body:
name: Update PR body
if: github.event.pull_request.head.repo.owner.login != 'rerun-io'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install deps
run: |
python3 -m pip install -r ./scripts/ci/requirements.txt
- name: Update PR description
run: |
./scripts/ci/update_pr_body.py \
--github-token '${{ secrets.GITHUB_TOKEN }}' \
--github-repository '${{ github.repository }}' \
--pr-number '${{ github.event.pull_request.number }}'