-
Notifications
You must be signed in to change notification settings - Fork 23
32 lines (30 loc) · 1.07 KB
/
master-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
name: 'Change PR target to master'
on:
pull_request:
branches:
- 'master'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
change-base:
name: 'Change base to develop branch'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
# fetch-depth 0 means deep clone the repo
fetch-depth: 0
- name: 'Change base'
env:
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }}
run: |
set -x
pull_number=$(jq --raw-output .pull_request.number "${GITHUB_EVENT_PATH}")
curl -X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
https://github.com/repos/runtimeverification/llvm-backend/pulls/${pull_number} \
-d '{"base":"develop"}'