-
Notifications
You must be signed in to change notification settings - Fork 188
33 lines (31 loc) · 1.02 KB
/
prepare-new-pr.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
name: 'Prepare new PR'
on:
pull_request_target:
types: [opened, synchronize]
branches: [ 'main*' ]
paths: ['.chloggen/*']
jobs:
prepare-new-pr:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
if: ${{ github.repository_owner == 'open-telemetry' }}
steps:
# check out main
- uses: actions/checkout@v4
# sparse checkout to only get the .chloggen directory
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
path: prchangelog
repository: ${{ github.event.pull_request.head.repo.full_name }}
sparse-checkout: .chloggen
# we're going to run prepare-new-pr script from the main branch
# to parse changelog record from the PR branch.
- name: Run prepare-new-pr.sh
run: ./.github/workflows/scripts/prepare-new-pr.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ github.event.pull_request.number }}
PR_CHANGELOG_PATH: prchangelog